刪除來賓設定指派
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}?api-version=2024-04-05
URI 參數
名稱 |
位於 |
必要 |
類型 |
Description |
guestConfigurationAssignmentName
|
path |
True
|
string
|
來賓組態指派的名稱
|
resourceGroupName
|
path |
True
|
string
|
資源組名。
Regex 模式: ^[-\w\._]+$
|
subscriptionId
|
path |
True
|
string
|
可唯一識別Microsoft Azure 訂用帳戶的訂用帳戶標識碼。 訂用帳戶標識碼會形成每個服務呼叫 URI 的一部分。
|
vmName
|
path |
True
|
string
|
虛擬機的名稱。
Regex 模式: ^[a-zA-Z0-9][-a-zA-Z0-9_.]*[a-zA-Z0-9]$
|
api-version
|
query |
True
|
string
|
用戶端 API 版本。
|
回應
名稱 |
類型 |
Description |
200 OK
|
|
還行
|
Other Status Codes
|
ErrorResponse
|
描述作業失敗原因的錯誤回應。
|
安全性
azure_auth
Azure Active Directory OAuth2 Flow
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 |
Description |
user_impersonation
|
模擬您的用戶帳戶
|
範例
Delete an guest configuration assignment
範例要求
DELETE https://management.azure.com/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/SecureProtocol?api-version=2024-04-05
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.GuestConfiguration.Models;
using Azure.ResourceManager.GuestConfiguration;
// Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/deleteGuestConfigurationAssignment.json
// this example is just showing the usage of "GuestConfigurationAssignments_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 GuestConfigurationVmAssignmentResource created on azure
// for more information of creating GuestConfigurationVmAssignmentResource, please refer to the document of GuestConfigurationVmAssignmentResource
string subscriptionId = "mySubscriptionId";
string resourceGroupName = "myResourceGroupName";
string vmName = "myVMName";
string guestConfigurationAssignmentName = "SecureProtocol";
ResourceIdentifier guestConfigurationVmAssignmentResourceId = GuestConfigurationVmAssignmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName);
GuestConfigurationVmAssignmentResource guestConfigurationVmAssignment = client.GetGuestConfigurationVmAssignmentResource(guestConfigurationVmAssignmentResourceId);
// invoke the operation
await guestConfigurationVmAssignment.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
定義
Error
名稱 |
類型 |
Description |
code
|
string
|
錯誤碼。
|
message
|
string
|
詳細數據錯誤訊息,指出作業失敗的原因。
|
ErrorResponse
作業失敗的錯誤回應
名稱 |
類型 |
Description |
error
|
Error
|
|