Szolgáltatás törlésének művelete.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}?api-version=2023-12-01
URI-paraméterek
Name |
In |
Kötelező |
Típus |
Description |
resourceGroupName
|
path |
True
|
string
|
Az erőforrást tartalmazó erőforráscsoport neve. Ezt az értéket az Azure Resource Manager API-ból vagy a portálról szerezheti be.
|
serviceName
|
path |
True
|
string
pattern: ^[a-z][a-z0-9-]*[a-z0-9]$
|
A szolgáltatáserőforrás neve.
|
subscriptionId
|
path |
True
|
string
|
Lekéri az előfizetés azonosítóját, amely egyedileg azonosítja a Microsoft Azure-előfizetést. Az előfizetés azonosítója minden szolgáltatáshíváshoz az URI részét képezi.
|
api-version
|
query |
True
|
string
minLength: 1
|
A művelethez használni kívánt API-verzió.
|
Válaszok
Name |
Típus |
Description |
200 OK
|
|
Siker. A válasz azt jelzi, hogy az erőforrás sikeresen törölve lett.
|
202 Accepted
|
|
Elfogadott. A válasz azt jelzi, hogy a törlési művelet a háttérben történik.
|
204 No Content
|
|
Siker. A válasz azt jelzi, hogy az erőforrás már törölve van.
|
Other Status Codes
|
CloudError
|
Hibaválasz, amely leírja, hogy miért nem sikerült a művelet.
|
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
Services_Delete
Mintakérelem
DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice?api-version=2023-12-01
/**
* Samples for Services Delete.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_Delete.json
*/
/**
* Sample code: Services_Delete.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void servicesDelete(com.azure.resourcemanager.AzureResourceManager azure) {
azure.springServices().manager().serviceClient().getServices().delete("myResourceGroup", "myservice",
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.appplatform import AppPlatformManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appplatform
# USAGE
python services_delete.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 = AppPlatformManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
client.services.begin_delete(
resource_group_name="myResourceGroup",
service_name="myservice",
).result()
# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_Delete.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
package armappplatform_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/685aad3f33d355c1d9c89d493ee9398865367bd8/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_Delete.json
func ExampleServicesClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginDelete(ctx, "myResourceGroup", "myservice", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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
const { AppPlatformManagementClient } = require("@azure/arm-appplatform");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Operation to delete a Service.
*
* @summary Operation to delete a Service.
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_Delete.json
*/
async function servicesDelete() {
const subscriptionId =
process.env["APPPLATFORM_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["APPPLATFORM_RESOURCE_GROUP"] || "myResourceGroup";
const serviceName = "myservice";
const credential = new DefaultAzureCredential();
const client = new AppPlatformManagementClient(credential, subscriptionId);
const result = await client.services.beginDeleteAndWait(resourceGroupName, serviceName);
console.log(result);
}
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://management.azure.com/subscriptions/subid/providers/Microsoft.AppPlatform/...pathToOperationResult...
Definíciók
CloudError
Objektum
Hibaválasz a szolgáltatástól.
Name |
Típus |
Description |
error
|
CloudErrorBody
|
Hibaválasz a szolgáltatástól.
|
CloudErrorBody
Objektum
Hibaválasz a szolgáltatástól.
Name |
Típus |
Description |
code
|
string
|
A hiba azonosítója. A kódok invariánsak, és programozott módon használhatók.
|
details
|
CloudErrorBody[]
|
A hiba további részleteinek listája.
|
message
|
string
|
A hibát leíró üzenet, amely alkalmas a felhasználói felületen való megjelenítésre.
|
target
|
string
|
Az adott hiba célja. Például a tulajdonság neve hibás.
|