AuthorizationExtensions.GetAzurePermissionsForResourcesAsync 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.AsyncPageable<Azure.ResourceManager.Authorization.Models.RoleDefinitionPermission> GetAzurePermissionsForResourcesAsync (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, System.Threading.CancellationToken cancellationToken = default);
static member GetAzurePermissionsForResourcesAsync : Azure.ResourceManager.Resources.ResourceGroupResource * string * string * string * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Authorization.Models.RoleDefinitionPermission>
<Extension()>
Public Function GetAzurePermissionsForResourcesAsync (resourceGroupResource As ResourceGroupResource, resourceProviderNamespace As String, parentResourcePath As String, resourceType As String, resourceName As String, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(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

An async 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