Role Management Policies - Delete
ロール管理ポリシーを削除する
DELETE https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}?api-version=2020-10-01
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
roleManagementPolicyName
|
path |
True
|
string
|
アップサートするロール管理ポリシーの名前 (guid)。
|
scope
|
path |
True
|
string
|
アップサートするロール管理ポリシーのスコープ。
|
api-version
|
query |
True
|
string
|
この操作に使用する API バージョン。
|
応答
名前 |
型 |
説明 |
200 OK
|
|
OK - ポリシーが正常に削除されました。
|
204 No Content
|
|
NoContent - ポリシーが存在しません。
|
Other Status Codes
|
CloudError
|
操作に失敗した理由を説明するエラー応答。
|
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 |
説明 |
user_impersonation
|
ユーザー アカウントの借用
|
例
DeleteRoleManagementPolicy
要求のサンプル
DELETE https://management.azure.com/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a?api-version=2020-10-01
/**
* Samples for RoleManagementPolicies Delete.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/
* DeleteRoleManagementPolicy.json
*/
/**
* Sample code: DeleteRoleManagementPolicy.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void deleteRoleManagementPolicy(com.azure.resourcemanager.AzureResourceManager azure) {
azure.accessManagement().roleAssignments().manager().roleServiceClient().getRoleManagementPolicies()
.deleteWithResponse("providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"570c3619-7688-4b34-b290-2b8bb3ccab2a", com.azure.core.util.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
package armauthorization_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/DeleteRoleManagementPolicy.json
func ExampleRoleManagementPoliciesClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewRoleManagementPoliciesClient().Delete(ctx, "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", "570c3619-7688-4b34-b290-2b8bb3ccab2a", nil)
if err != nil {
log.Fatalf("failed to finish the request: %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
const { AuthorizationManagementClient } = require("@azure/arm-authorization");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Delete a role management policy
*
* @summary Delete a role management policy
* x-ms-original-file: specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/DeleteRoleManagementPolicy.json
*/
async function deleteRoleManagementPolicy() {
const subscriptionId =
process.env["AUTHORIZATION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope =
"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368";
const roleManagementPolicyName = "570c3619-7688-4b34-b290-2b8bb3ccab2a";
const credential = new DefaultAzureCredential();
const client = new AuthorizationManagementClient(credential, subscriptionId);
const result = await client.roleManagementPolicies.delete(scope, roleManagementPolicyName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
定義
CloudError
サービスからのエラー応答。
CloudErrorBody
サービスからのエラー応答。
名前 |
型 |
説明 |
code
|
string
|
エラーの識別子。 コードは不変であり、プログラムによって使用されることを意図しています。
|
message
|
string
|
ユーザー インターフェイスでの表示に適したエラーを説明するメッセージ。
|