SchemaRegistry törlése
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}?api-version=2024-09-01-preview
URI-paraméterek
Name |
In |
Kötelező |
Típus |
Description |
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Az erőforráscsoport neve. A név nem megkülönbözteti a kis- és nagybetűket.
|
schemaRegistryName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Sémaregisztrációs adatbázisnév paramétere.
|
subscriptionId
|
path |
True
|
string
(uuid)
|
A cél-előfizetés azonosítója. Az értéknek UUID-nek kell lennie.
|
api-version
|
query |
True
|
string
minLength: 1
|
A művelethez használni kívánt API-verzió.
|
Válaszok
Name |
Típus |
Description |
202 Accepted
|
|
Az erőforrás törlése elfogadott.
Fejlécek
- Location: string
- Retry-After: integer
|
204 No Content
|
|
Az erőforrás nem létezik.
|
Other Status Codes
|
ErrorResponse
|
Váratlan hibaválasz.
|
Biztonság
azure_auth
Azure Active Directory OAuth2 Flow.
Típus:
oauth2
Folyamat:
implicit
Engedélyezési URL:
https://login.microsoftonline.com/common/oauth2/authorize
Hatókörök
Name |
Description |
user_impersonation
|
a felhasználói fiók megszemélyesítése
|
Példák
Delete_SchemaRegistry
Mintakérelem
DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/schemaRegistries/my-schema-registry?api-version=2024-09-01-preview
/**
* Samples for SchemaRegistries Delete.
*/
public final class Main {
/*
* x-ms-original-file: 2024-09-01-preview/Delete_SchemaRegistry.json
*/
/**
* Sample code: Delete_SchemaRegistry.
*
* @param manager Entry point to DeviceRegistryManager.
*/
public static void deleteSchemaRegistry(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
manager.schemaRegistries().delete("myResourceGroup", "my-schema-registry", 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
from azure.identity import DefaultAzureCredential
from azure.mgmt.deviceregistry import DeviceRegistryMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-deviceregistry
# USAGE
python delete_schema_registry.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 = DeviceRegistryMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
client.schema_registries.begin_delete(
resource_group_name="myResourceGroup",
schema_registry_name="my-schema-registry",
).result()
# x-ms-original-file: 2024-09-01-preview/Delete_SchemaRegistry.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
const { DeviceRegistryManagementClient } = require("@azure/arm-deviceregistry");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to delete a SchemaRegistry
*
* @summary delete a SchemaRegistry
* x-ms-original-file: 2024-09-01-preview/Delete_SchemaRegistry.json
*/
async function deleteSchemaRegistry() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new DeviceRegistryManagementClient(credential, subscriptionId);
await client.schemaRegistries.delete("myResourceGroup", "my-schema-registry");
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.DeviceRegistry.Models;
using Azure.ResourceManager.DeviceRegistry;
// Generated from example definition: 2024-09-01-preview/Delete_SchemaRegistry.json
// this example is just showing the usage of "SchemaRegistry_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 DeviceRegistrySchemaRegistryResource created on azure
// for more information of creating DeviceRegistrySchemaRegistryResource, please refer to the document of DeviceRegistrySchemaRegistryResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "myResourceGroup";
string schemaRegistryName = "my-schema-registry";
ResourceIdentifier deviceRegistrySchemaRegistryResourceId = DeviceRegistrySchemaRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaRegistryName);
DeviceRegistrySchemaRegistryResource deviceRegistrySchemaRegistry = client.GetDeviceRegistrySchemaRegistryResource(deviceRegistrySchemaRegistryResourceId);
// invoke the operation
await deviceRegistrySchemaRegistry.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
Mintaválasz
location: https://contoso.com/operationstatus
Definíciók
ErrorAdditionalInfo
Objektum
Az erőforrás-kezelési hiba további információi.
Name |
Típus |
Description |
info
|
object
|
A további információk.
|
type
|
string
|
A további információtípus.
|
ErrorDetail
Objektum
A hiba részletei.
Name |
Típus |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
A hiba további információi.
|
code
|
string
|
A hibakód.
|
details
|
ErrorDetail[]
|
A hiba részletei.
|
message
|
string
|
A hibaüzenet.
|
target
|
string
|
A hibacél.
|
ErrorResponse
Objektum
Hibaválasz
Name |
Típus |
Description |
error
|
ErrorDetail
|
A hibaobjektum.
|