Supprime une ressource de version de type d’application Service Fabric.
Supprimez une ressource de version de type d’application Service Fabric avec le nom spécifié.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}?api-version=2023-11-01-preview
Paramètres URI
Nom |
Dans |
Obligatoire |
Type |
Description |
applicationTypeName
|
path |
True
|
string
|
Nom de la ressource de nom du type d’application.
|
clusterName
|
path |
True
|
string
|
Nom de la ressource de cluster.
|
resourceGroupName
|
path |
True
|
string
|
Nom du groupe de ressources.
|
subscriptionId
|
path |
True
|
string
|
Identificateur d’abonnement client.
|
version
|
path |
True
|
string
|
Version du type d’application.
|
api-version
|
query |
True
|
string
|
Version de l’API du fournisseur de ressources Service Fabric. Il s’agit d’un paramètre obligatoire et sa valeur doit être « 2023-11-01-preview » pour cette spécification.
|
Réponses
Nom |
Type |
Description |
202 Accepted
|
|
La demande a été acceptée et l’opération se termine de manière asynchrone.
|
204 No Content
|
|
La ressource est introuvable.
|
Other Status Codes
|
ErrorModel
|
Réponse d’erreur détaillée.
|
Sécurité
azure_auth
Flux OAuth2 Azure Active Directory
Type:
oauth2
Flux:
implicit
URL d’autorisation:
https://login.microsoftonline.com/common/oauth2/authorize
Étendues
Nom |
Description |
user_impersonation
|
Emprunter l’identité de votre compte d’utilisateur
|
Exemples
Delete an application type version
Exemple de requête
DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType/versions/1.0?api-version=2023-11-01-preview
from azure.identity import DefaultAzureCredential
from azure.mgmt.servicefabric import ServiceFabricManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-servicefabric
# USAGE
python application_type_version_delete_operation_example.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 = ServiceFabricManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
client.application_type_versions.begin_delete(
resource_group_name="resRg",
cluster_name="myCluster",
application_type_name="myAppType",
version="1.0",
).result()
# x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/preview/2023-11-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.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 Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.ServiceFabric;
// Generated from example definition: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/preview/2023-11-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json
// this example is just showing the usage of "ApplicationTypeVersions_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 ServiceFabricApplicationTypeVersionResource created on azure
// for more information of creating ServiceFabricApplicationTypeVersionResource, please refer to the document of ServiceFabricApplicationTypeVersionResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "resRg";
string clusterName = "myCluster";
string applicationTypeName = "myAppType";
string version = "1.0";
ResourceIdentifier serviceFabricApplicationTypeVersionResourceId = ServiceFabricApplicationTypeVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, applicationTypeName, version);
ServiceFabricApplicationTypeVersionResource serviceFabricApplicationTypeVersion = client.GetServiceFabricApplicationTypeVersionResource(serviceFabricApplicationTypeVersionResourceId);
// invoke the operation
await serviceFabricApplicationTypeVersion.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
Exemple de réponse
Retry-After: 10
Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/28e62369-ed8c-4aba-8c05-ab7d6238cc3d?api-version=2023-11-01-preview
Définitions
ErrorModel
Structure de l’erreur.
ErrorModelError
Détails de l’erreur.
Nom |
Type |
Description |
code
|
string
|
Code d'erreur.
|
message
|
string
|
Message d’erreur.
|