ToResourceIdentity() public method

public ToResourceIdentity ( ) : Microsoft.Azure.ResourceIdentity
return Microsoft.Azure.ResourceIdentity
Exemplo n.º 1
0
        internal List <PSPermission> GetResourcePermissions(ResourceIdentifier identity)
        {
            PermissionGetResult permissionsResult = AuthorizationManagementClient.Permissions.ListForResource(
                identity.ResourceGroupName,
                identity.ToResourceIdentity());

            if (permissionsResult != null)
            {
                return(permissionsResult.Permissions.Select(p => p.ToPSPermission()).ToList());
            }

            return(null);
        }
Exemplo n.º 2
0
        internal List <PSPermission> GetResourcePermissions(ResourceIdentifier identity)
        {
            var resourceIdentity  = identity.ToResourceIdentity();
            var permissionsResult = AuthorizationManagementClient.Permissions.ListForResource(
                identity.ResourceGroupName,
                resourceIdentity.ResourceProviderNamespace,
                resourceIdentity.ParentResourcePath ?? "",
                resourceIdentity.ResourceType,
                resourceIdentity.ResourceName);

            if (permissionsResult != null)
            {
                return(permissionsResult.Select(p => p.ToPSPermission()).ToList());
            }

            return(null);
        }
Exemplo n.º 3
0
        internal List<PSPermission> GetResourcePermissions(ResourceIdentifier identity)
        {
            PermissionGetResult permissionsResult = AuthorizationManagementClient.Permissions.ListForResource(
                    identity.ResourceGroupName,
                    identity.ToResourceIdentity());

            if (permissionsResult != null)
            {
                return permissionsResult.Permissions.Select(p => p.ToPSPermission()).ToList();
            }

            return null;
        }