Usuwa zasób wersji aplikacji usługi Service Fabric.
Usuń zasób wersji aplikacji usługi Service Fabric o określonej nazwie.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}?api-version=2023-11-01-preview
Parametry identyfikatora URI
Nazwa |
W |
Wymagane |
Typ |
Opis |
applicationTypeName
|
path |
True
|
string
|
Nazwa zasobu typu aplikacji.
|
clusterName
|
path |
True
|
string
|
Nazwa zasobu klastra.
|
resourceGroupName
|
path |
True
|
string
|
Nazwa grupy zasobów.
|
subscriptionId
|
path |
True
|
string
|
Identyfikator subskrypcji klienta.
|
version
|
path |
True
|
string
|
Wersja typu aplikacji.
|
api-version
|
query |
True
|
string
|
Wersja interfejsu API dostawcy zasobów usługi Service Fabric. Jest to wymagany parametr i dla tej specyfikacji musi być wartość "2023-11-01-preview".
|
Odpowiedzi
Nazwa |
Typ |
Opis |
202 Accepted
|
|
Żądanie zostało zaakceptowane, a operacja zostanie ukończona asynchronicznie.
|
204 No Content
|
|
Nie można odnaleźć zasobu.
|
Other Status Codes
|
ErrorModel
|
Szczegółowa odpowiedź na błąd.
|
Zabezpieczenia
azure_auth
Przepływ OAuth2 usługi Azure Active Directory
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
Nazwa |
Opis |
user_impersonation
|
personifikacja konta użytkownika
|
Przykłady
Delete an application type version
Przykładowe żądanie
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
Przykładowa odpowiedź
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
Definicje
ErrorModel
Struktura błędu.
ErrorModelError
Szczegóły błędu.
Nazwa |
Typ |
Opis |
code
|
string
|
Kod błędu.
|
message
|
string
|
Komunikat o błędzie.
|