Deletes a managed instance administrator.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/ActiveDirectory?api-version=2023-08-01
URI Parameters Name In Required Type Description
administratorName
path TruemanagedInstanceName
path Truestring
The name of the managed instance.
resourceGroupName
path Truestring
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
subscriptionId
path Truestring
The subscription ID that identifies an Azure subscription.
api-version
query Truestring
The API version to use for the request.
Responses Name Type Description 200 OKSuccessfully deleted the managed instance administrator.
202 AcceptedAccepted
Headers
Location: string
Other Status Codes*** Error Responses: ***
400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.
400 InvalidManagedServerAdministratorType - Invalid administrator type specified in properties.
400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.
400 InvalidManagedServerAzureADAdminDeleteOperation - User tried to delete managed server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.
400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default
400 ServerPrincipalCreateLoginBadSyntax - There was an Syntax Error when executing Create Login statement for Azure AD Administrator.
400 ManagedInstanceIsBusy - Managed Instance is busy with another request.
400 InvalidLoginName - The provided login name is invalid.
400 ServicePrincipalLookupInAadFailedIdentityForbidden - AzureAD Lookup failed because MSI was not granted read permissions on AAD.
400 PrincipalNotFoundInTenant - AzureAD Lookup returned no results for this name.
400 ServerPrincipalHasDuplicateDisplayNameInAad - AzureAD Lookup returned multiple results for this name.
400 InvalidPrincipalType - This principal type is not supported in Windows Azure SQL Database.
400 InvalidParameterValue - An invalid value was given to a parameter.
400 ServicePrincipalLookupInAadFailed - AzureAD Lookup failed due to service infrastructure errors.
400 TenantNotFoundInActiveDirectory - Tenant is not available in active directory.
400 InvalidUsername - Supplied user name contains invalid characters.
400 ManagedInstanceHasNoPermissionsToAccessAad - Attempt to perform operation, which involves a non-existing login or login on which executing principal has no permissions.
404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.
404 SubscriptionNotFound - The requested subscription was not found.
404 ServerNotInSubscription - Specified server does not exist on the specified subscription.
404 OperationIdNotFound - The operation with Id does not exist.
404 ResourceNotFound - The requested resource was not found.
409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.
409 OperationCancelled - The operation has been cancelled by user.
409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.
409 ServerPrincipalOwnsJobs - Attempt to remove a login when it has active jobs.
409 ServerPrincipalOwnsObjects - Attempt to drop a login, which owns objects.
409 ServerPrincipalIsGrantorOfPermissions - Attempt to drop a server principal, which is a grantor of permissions.
409 ServerPrincipalOwnsDatabase - Change the owner of the database(s) before dropping the login.
409 ServerPrincipalCurrentlyLoggedIn - Self-explanatory.
409 ServerPrincipalAlreadyExists - Attempt to create server principal with non-unique name.
409 ServerPrincipalUsedInTriggerOrEventNotification - Attempt to drop login, which is used as an execution context of a trigger or event notification.
429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.
429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.
429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.
429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.
500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.
500 ActiveDirectoryLookupTimedOut - The operation could not be completed at this time. Please try again later.
503 TooManyRequests - Requests beyond max requests that can be processed by available resources.
503 TooManyRequests - Requests beyond max requests that can be processed by available resources.
504 RequestTimeout - Service request exceeded the allowed timeout.
DELETE https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory?api-version=2023-08-01
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorDelete.json
// this example is just showing the usage of "ManagedInstanceAdministrators_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 ManagedInstanceAdministratorResource created on azure
// for more information of creating ManagedInstanceAdministratorResource, please refer to the document of ManagedInstanceAdministratorResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "Default-SQL-SouthEastAsia";
string managedInstanceName = "managedInstance";
SqlAdministratorName administratorName = SqlAdministratorName.ActiveDirectory;
ResourceIdentifier managedInstanceAdministratorResourceId = ManagedInstanceAdministratorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName, administratorName);
ManagedInstanceAdministratorResource managedInstanceAdministrator = client.GetManagedInstanceAdministratorResource(managedInstanceAdministratorResourceId);
// invoke the operation
await managedInstanceAdministrator.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
Sample responseLocation: https://management.azure.com/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/managedinstanceadministratorazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview
Definitions AdministratorName
Enumeration
Value Description ActiveDirectory ErrorAdditionalInfoObject
The resource management error additional info.
Name Type Description infoobject
The additional info.
typestring
The additional info type.
ErrorDetailObject
The error detail.
Name Type Description additionalInfoThe error additional info.
codestring
The error code.
detailsThe error details.
messagestring
The error message.
targetstring
The error target.
ErrorResponseObject
Error response
Name Type Description errorThe error object.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4