Удаляет ресурс версии типа приложения Service Fabric.
Удалите ресурс версии типа приложения Service Fabric с указанным именем.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}?api-version=2023-11-01-preview
Параметры URI
Имя |
В |
Обязательно |
Тип |
Описание |
applicationTypeName
|
path |
True
|
string
|
Имя ресурса типа приложения.
|
clusterName
|
path |
True
|
string
|
Имя ресурса кластера.
|
resourceGroupName
|
path |
True
|
string
|
Имя группы ресурсов.
|
subscriptionId
|
path |
True
|
string
|
Идентификатор подписки клиента.
|
version
|
path |
True
|
string
|
Версия типа приложения.
|
api-version
|
query |
True
|
string
|
Версия API поставщика ресурсов Service Fabric. Это обязательный параметр, и его значение должно быть "2023-11-01-preview" для этой спецификации.
|
Ответы
Имя |
Тип |
Описание |
202 Accepted
|
|
Запрос был принят, и операция завершится асинхронно.
|
204 No Content
|
|
Ресурс не найден.
|
Other Status Codes
|
ErrorModel
|
Подробный ответ об ошибке.
|
Безопасность
azure_auth
Поток OAuth2 в Azure Active Directory
Тип:
oauth2
Flow:
implicit
URL-адрес авторизации:
https://login.microsoftonline.com/common/oauth2/authorize
Области
Имя |
Описание |
user_impersonation
|
олицетворения учетной записи пользователя
|
Примеры
Delete an application type version
Образец запроса
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
Пример ответа
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
Определения
ErrorModel
Структура ошибки.
ErrorModelError
Сведения об ошибке.
Имя |
Тип |
Описание |
code
|
string
|
Код ошибки.
|
message
|
string
|
Сообщение об ошибке.
|