Querying AccountShare
When I query for an AccountShare, I get some interesting stuff, including an ID but no name, label or fullname :
SELECT ID, RowCause, UserOrGroupId, AccountAccessLevel, ContactAccessLevel, CaseAccessLevel, OpportunityAccessLevel FROM AccountShare WHERE AccountId = 'any-account-id'
returns stuff like this
Account Sharing Rule in Setup
Supposing the returned id is '03Gb0000000L72T', I can lookup this sharing rule at
https://<mydomain>.my.salesforce.com/setup/own/shareRule.jsp?id=03Gb0000000L72T
This setup screen shows some descriptive fields 'Label', 'Rule Name', 'Description' before the definition of the sharing rule :
Account Sharing Rule in SFDX Metadata
Now when I look at what SFDX returns for those AccountShare sharing rules, in sharingRules/Account.sharingRules-meta.xml, I get something like this :
Question
** How can I programmatically match the AccountShare id and the Account.sharingRules fullName ?**