Deletes the registration definition.
DELETE https://management.azure.com/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registrationDefinitionId}?api-version=2022-10-01
URI Parameters
Name |
In |
Required |
Type |
Description |
registrationDefinitionId
|
path |
True
|
string
|
The GUID of the registration definition.
|
scope
|
path |
True
|
string
|
The scope of the resource.
|
api-version
|
query |
True
|
string
|
The API version to use for this operation.
|
Responses
Name |
Type |
Description |
200 OK
|
|
OK - The registration definition is deleted.
|
204 No Content
|
|
No Content - The registration definition does not exist.
|
Other Status Codes
|
ErrorResponse
|
The error response describing why the operation failed.
|
Security
azure_auth
The Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
impersonate your user account
|
Examples
Delete Registration Definition
Sample Request
DELETE https://management.azure.com/subscription/0afefe50-734e-4610-8a82-a144ahf49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-6e081c90ada2?api-version=2022-10-01
from azure.identity import DefaultAzureCredential
from azure.mgmt.managedservices import ManagedServicesClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-managedservices
# USAGE
python delete_registration_definition.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ManagedServicesClient(
credential=DefaultAzureCredential(),
)
response = client.registration_definitions.delete(
registration_definition_id="26c128c2-fefa-4340-9bb1-6e081c90ada2",
scope="subscription/0afefe50-734e-4610-8a82-a144ahf49dea",
)
print(response)
# x-ms-original-file: specification/managedservices/resource-manager/Microsoft.ManagedServices/stable/2022-10-01/examples/DeleteRegistrationDefinition.json
if __name__ == "__main__":
main()
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 System.Xml;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.ManagedServices;
using Azure.ResourceManager.ManagedServices.Models;
// Generated from example definition: specification/managedservices/resource-manager/Microsoft.ManagedServices/stable/2022-10-01/examples/DeleteRegistrationDefinition.json
// this example is just showing the usage of "RegistrationDefinitions_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 ManagedServicesRegistrationResource created on azure
// for more information of creating ManagedServicesRegistrationResource, please refer to the document of ManagedServicesRegistrationResource
string scope = "subscription/0afefe50-734e-4610-8a82-a144ahf49dea";
string registrationId = "26c128c2-fefa-4340-9bb1-6e081c90ada2";
ResourceIdentifier managedServicesRegistrationResourceId = ManagedServicesRegistrationResource.CreateResourceIdentifier(scope, registrationId);
ManagedServicesRegistrationResource managedServicesRegistration = client.GetManagedServicesRegistrationResource(managedServicesRegistrationResourceId);
// invoke the operation
await managedServicesRegistration.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
Definitions
Name |
Description |
ErrorDefinition
|
The error response indicating why the incoming request wasn’t able to be processed
|
ErrorResponse
|
Error response.
|
ErrorDefinition
The error response indicating why the incoming request wasn’t able to be processed
Name |
Type |
Description |
code
|
string
|
The error code.
|
details
|
ErrorDefinition[]
|
The internal error details.
|
message
|
string
|
The error message indicating why the operation failed.
|
ErrorResponse
Error response.