共用方式為


AuthorizationExtensions.GetAzurePermissionsForResources Method

Definition

Gets all permissions the caller has for a resource.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions
  • Operation Id: AzurePermissionsForResource_List
  • Default Api Version: 2022-04-01
public static Azure.Pageable<Azure.ResourceManager.Authorization.Models.RoleDefinitionPermission> GetAzurePermissionsForResources (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, System.Threading.CancellationToken cancellationToken = default);
static member GetAzurePermissionsForResources : Azure.ResourceManager.Resources.ResourceGroupResource * string * string * string * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Authorization.Models.RoleDefinitionPermission>
<Extension()>
Public Function GetAzurePermissionsForResources (resourceGroupResource As ResourceGroupResource, resourceProviderNamespace As String, parentResourcePath As String, resourceType As String, resourceName As String, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of RoleDefinitionPermission)

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

resourceProviderNamespace
String

The namespace of the resource provider.

parentResourcePath
String

The parent resource identity.

resourceType
String

The resource type of the resource.

resourceName
String

The name of the resource to get the permissions for.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of RoleDefinitionPermission that may take multiple service requests to iterate over.

Exceptions

resourceName is an empty string, and was expected to be non-empty.

resourceGroupResource, resourceProviderNamespace, parentResourcePath, resourceType or resourceName is null.

Applies to