删除 IoT Central 应用程序。
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}?api-version=2021-06-01
URI 参数
名称 |
在 |
必需 |
类型 |
说明 |
resourceGroupName
|
path |
True
|
string
|
包含 IoT Central 应用程序的资源组的名称。
|
resourceName
|
path |
True
|
string
|
IoT Central 应用程序的 ARM 资源名称。
|
subscriptionId
|
path |
True
|
string
|
订阅标识符。
|
api-version
|
query |
True
|
string
|
API 的版本。
|
响应
名称 |
类型 |
说明 |
200 OK
|
|
这是作为对删除作的状态轮询请求的响应返回的。 正文包含指示过渡性预配状态的资源表示形式。
|
202 Accepted
|
|
已接受 - 删除已接受的请求;作将以异步方式完成。
|
204 No Content
|
|
长时间运行的删除作成功完成后,当状态轮询请求在服务中找到 IoT Central 应用程序元数据并将删除作的状态设置为已完成状态时,将返回 204“无内容”状态代码。
|
Other Status Codes
|
CloudError
|
DefaultErrorResponse
|
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 |
说明 |
user_impersonation
|
模拟用户帐户
|
示例
Apps_Delete
示例请求
DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.IoTCentral/iotApps/myIoTCentralApp?api-version=2021-06-01
import com.azure.core.util.Context;
/** Samples for Apps Delete. */
public final class Main {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json
*/
/**
* Sample code: Apps_Delete.
*
* @param manager Entry point to IotCentralManager.
*/
public static void appsDelete(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
manager.apps().delete("resRg", "myIoTCentralApp", 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.iotcentral import IotCentralClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iotcentral
# USAGE
python apps_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 = IotCentralClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.apps.begin_delete(
resource_group_name="resRg",
resource_name="myIoTCentralApp",
).result()
print(response)
# x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_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 armiotcentral_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotcentral/armiotcentral"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json
func ExampleAppsClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armiotcentral.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAppsClient().BeginDelete(ctx, "resRg", "myIoTCentralApp", 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
示例响应
message: Created
code: 200
{
"error": {
"code": "Error code",
"message": "Error message",
"target": "Error target"
}
}
定义
CloudError
Object
错误详细信息。
名称 |
类型 |
说明 |
error.code
|
string
|
错误代码。
|
error.details
|
CloudErrorBody[]
|
有关错误的其他详细信息的列表。
|
error.message
|
string
|
错误消息。
|
error.target
|
string
|
特定错误的目标。
|
CloudErrorBody
Object
错误响应的详细信息。
名称 |
类型 |
说明 |
code
|
string
|
错误代码。
|
details
|
CloudErrorBody[]
|
有关错误的其他详细信息的列表。
|
message
|
string
|
错误消息。
|
target
|
string
|
特定错误的目标。
|