I am a software developer with almost no knowledge of international laws. So here is a hypothetical scenario. Let's say, I live in a XYZ country and Google cloud has a data center in my country and I use their service to keep my data in the cloud, in the data center that is present inside my country.
If the USA puts my country on the sanctioned list(or restricts trade), like Iran, then I suppose American companies won't be allowed to do any business with any citizen of my country. In this case, what happens to my data? Since to do any business in my country, a company has to register a local entity, there will be a separate entity that is "Google XYZ".
Is it legal for "Google XYZ" to continue the operation in my country? Or Since this is a subsidiary or related to Google in the USA, it can't continue the business? (I have no idea how this type of setup works when a company opens a branch in another country)
If it is allowed, I guess I will be able to retrieve my data, but what if it's not technically feasible to retrieve data without going through infrastructure owned by Google in the USA?
If it is not allowed, then what happens to company assets in the sanctioned country? Like some have manufacturing units, some have data centers, and many other kinds of assets.
I am a little worried since I saw how some people in Iran were locked out of Github without any option to export their data. And this case, the majority of cloud providers are American companies, so just wanted to get some clarity.