PATCH
/
cloud
/
v1
/
file_shares
/
{project_id}
/
{region_id}
/
{file_share_id}
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
file_share = client.cloud.file_shares.update(
    file_share_id="bd8c47ee-e565-4e26-8840-b537e6827b08",
    project_id=1,
    region_id=1,
)
print(file_share.id)
{
  "connection_point": "10.254.0.43:/shares/share-7c14ca01-ea5e-4d85-a6e2-c104fe6b561a",
  "created_at": "2023-04-25T11:06:49.226920",
  "creator_task_id": "6ab1ead7-8640-4ae9-9e20-9e0bafcd2eca",
  "id": "bd8c47ee-e565-4e26-8840-b537e6827b08",
  "name": "test-sfs",
  "network_id": "e72fd98e-32fa-474d-b0a3-bca11c3064ff",
  "network_name": "File_share_test-sfs",
  "project_id": 1337,
  "protocol": "NFS",
  "region": "Luxembourg 1",
  "region_id": 7,
  "share_network_name": "File_share_test-sfs_network",
  "share_settings": {
    "type_name": "<string>"
  },
  "size": 10,
  "status": "available",
  "subnet_id": "ac601bb9-4d77-4356-96de-66ab29711815",
  "subnet_name": "subnet_test-sfs",
  "tags": [
    {
      "key": "my-tag",
      "read_only": false,
      "value": "my-tag-value"
    }
  ],
  "task_id": "22b1eau7-8641-4ae9-9n20-9e0b5fcd2gca",
  "type_name": "standard",
  "volume_type": "default_share_type"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

Examples:

1

region_id
integer
required

Region ID

Examples:

1

file_share_id
string<uuid4>
required

File Share ID

Examples:

"bd8c47ee-e565-4e26-8840-b537e6827b08"

Body

application/json
name
string

Name

Examples:

"some_name"

tags
object | null

Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide key-value pairs to add or update tags. Set tag values to null to remove tags. Unspecified tags remain unchanged. Read-only tags are always preserved and cannot be modified. Examples: * Add/update tags: {'tags': {'environment': 'production', 'team': 'backend'}} adds new tags or updates existing ones. * Delete tags: {'tags': {'old_tag': null}} removes specific tags. * Remove all tags: {'tags': null} removes all user-managed tags (read-only tags are preserved). * Partial update: {'tags': {'environment': 'staging'}} only updates specified tags. * Mixed operations: {'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}} adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag', preserving other existing tags. * Replace all: first delete existing tags with null values, then add new ones in the same request.

Examples:
{
"my-tag": "my-tag-value",
"my-tag-to-remove": null
}

Response

200 - application/json

OK

connection_point
string | null
required

Connection point. Can be null during File share creation

Examples:

"10.254.0.43:/shares/share-7c14ca01-ea5e-4d85-a6e2-c104fe6b561a"

created_at
string
required

Datetime when the file share was created

Examples:

"2023-04-25T11:06:49.226920"

creator_task_id
string<uuid4>
required

Task that created this entity

Examples:

"6ab1ead7-8640-4ae9-9e20-9e0bafcd2eca"

id
string<uuid4>
required

File share ID

Examples:

"bd8c47ee-e565-4e26-8840-b537e6827b08"

name
string
required

File share name

Examples:

"test-sfs"

network_id
string<uuid4>
required

Network ID.

Examples:

"e72fd98e-32fa-474d-b0a3-bca11c3064ff"

network_name
string
required

Network name.

Examples:

"File_share_test-sfs"

project_id
integer
required

Project ID

Examples:

1337

protocol
string
required

File share protocol

Examples:

"NFS"

region
string
required

Region name

Examples:

"Luxembourg 1"

region_id
integer
required

Region ID

Examples:

7

share_network_name
string | null
required

Share network name. May be null if the file share was created with volume type VAST

Examples:

"File_share_test-sfs_network"

share_settings
object
required

Share settings specific to the file share type

size
integer
required

File share size in GiB

Required range: x >= 1
Examples:

10

status
enum<string>
required

File share status

Available options:
available,
awaiting_transfer,
backup_creating,
backup_restoring,
backup_restoring_error,
creating,
creating_from_snapshot,
deleted,
deleting,
ensuring,
error,
error_deleting,
extending,
extending_error,
inactive,
manage_error,
manage_starting,
migrating,
migrating_to,
replication_change,
reverting,
reverting_error,
shrinking,
shrinking_error,
shrinking_possible_data_loss_error,
unmanage_error,
unmanage_starting,
unmanaged
subnet_id
string<uuid4>
required

Subnet ID.

Examples:

"ac601bb9-4d77-4356-96de-66ab29711815"

subnet_name
string
required

Subnet name.

Examples:

"subnet_test-sfs"

tags
TagSerializer · object[]
required

List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.

Examples:
[
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
]
task_id
string<uuid4> | null
required

The UUID of the active task that currently holds a lock on the resource. This lock prevents concurrent modifications to ensure consistency. If null, the resource is not locked.

Examples:

"22b1eau7-8641-4ae9-9n20-9e0b5fcd2gca"

type_name
enum<string>
required

File share type name

Available options:
standard,
vast
volume_type
enum<string>
required

Deprecated. Use type_name instead. File share disk type

Available options:
default_share_type,
vast_share_type