galileo_sdk.sdk.stations.StationsSdk.update_station_resource_policy

StationsSdk.update_station_resource_policy(station_id, max_cpu_per_job=None, max_memory_per_job=None, max_gpu_per_job=None, max_cpu_per_station=None, max_memory_per_station=None, max_gpu_per_station=None, max_cpu_global=None, max_memory_global=None, max_gpu_global=None, max_projects=None, max_users_in_station=None, max_stations=None, max_project_types=None, max_cloud_storage_space=None, max_spend_per_day=None, max_spend_per_week=None, max_spend_per_month=None, max_spend_per_year=None, cpu_credits_per_hour=None, memory_credits_per_hour=None, gpu_credits_per_hour=None)[source]

Updates an the resource policy attached to the station. Creates the policy if it does not exist.

Parameters
  • station_id – str

  • max_cpu_per_job – int

  • max_memory_per_job – int

  • max_gpu_per_job – int

  • max_cpu_per_station – int

  • max_memory_per_station – int

  • max_gpu_per_station – int

  • max_cpu_global – int

  • max_memory_global – int

  • max_gpu_global – int

  • max_projects – int

  • max_users_in_station – int

  • max_stations – int

  • max_project_types – int

  • max_cloud_storage_space – int

  • max_spend_per_day – int

  • max_spend_per_week – int

  • max_spend_per_month – int

  • max_spend_per_year – int

  • cpu_credits_per_hour – int

  • memory_credits_per_hour – int

Returns

ResourcePolicy

Example:
>>> station_id = "my-station-id"
>>> resource_policy = galileo.stations.get_station_resource_policy(station_id)
>>> new_max_cpu_per_job = resource_policy.max_cpu_per_job + 1
>>> updated_resource_policy = galileo.stations.update_station_resource_policy(station_id, max_cpu_per_job=new_max_cpu_per_job)
>>> print(updated_resource_policy.max_cpu_per_job)