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: 2026-04-01-preview/sqlVulnerabilityAssessmentsSettingsOperations/SqlManagedInstanceSettings_Delete.json
func ExampleSQLVulnerabilityAssessmentSettingsClient_Delete_deleteSqlVulnerabilityAssessmentSettingsOnAResourceSqlManagedInstance() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSQLVulnerabilityAssessmentSettingsClient().Delete(ctx, "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armsecurity.SQLVulnerabilityAssessmentSettingsClientDeleteResponse{
// }
}
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: 2026-04-01-preview/sqlVulnerabilityAssessmentsSettingsOperations/SqlServerSettings_Delete.json
func ExampleSQLVulnerabilityAssessmentSettingsClient_Delete_deleteSqlVulnerabilityAssessmentSettingsOnAResourceSqlServer() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSQLVulnerabilityAssessmentSettingsClient().Delete(ctx, "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armsecurity.SQLVulnerabilityAssessmentSettingsClientDeleteResponse{
// }
}
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: 2026-04-01-preview/sqlVulnerabilityAssessmentsSettingsOperations/SynapseSettings_Delete.json
func ExampleSQLVulnerabilityAssessmentSettingsClient_Delete_deleteSqlVulnerabilityAssessmentSettingsOnAResourceSynapse() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSQLVulnerabilityAssessmentSettingsClient().Delete(ctx, "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armsecurity.SQLVulnerabilityAssessmentSettingsClientDeleteResponse{
// }
}
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).