import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
access_rule = client.cloud.file_shares.access_rules.create(
file_share_id="bd8c47ee-e565-4e26-8840-b537e6827b08",
project_id=1,
region_id=1,
access_mode="ro",
ip_address="192.168.1.1",
)
print(access_rule.id)