import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.file_shares.list(
project_id=1,
region_id=1,
)
page = page.results[0]
print(page.id){
"count": 1,
"results": [
{
"connection_point": "10.254.0.43:/shares/share-7c14ca01-ea5e-4d85-a6e2-c104fe6b561a",
"created_at": "<string>",
"creator_task_id": "<string>",
"id": "<string>",
"name": "<string>",
"network_id": "<string>",
"network_name": "<string>",
"project_id": 123,
"protocol": "<string>",
"region": "<string>",
"region_id": 123,
"share_network_name": "File_share_test-sfs_network",
"share_settings": {
"type_name": "<string>"
},
"size": 2,
"status": "available",
"subnet_id": "<string>",
"subnet_name": "<string>",
"tags": [
{
"key": "<string>",
"read_only": true,
"value": "<string>"
}
],
"task_id": "22b1eau7-8641-4ae9-9n20-9e0b5fcd2gca",
"type_name": "standard",
"volume_type": "default_share_type"
}
]
}import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.file_shares.list(
project_id=1,
region_id=1,
)
page = page.results[0]
print(page.id){
"count": 1,
"results": [
{
"connection_point": "10.254.0.43:/shares/share-7c14ca01-ea5e-4d85-a6e2-c104fe6b561a",
"created_at": "<string>",
"creator_task_id": "<string>",
"id": "<string>",
"name": "<string>",
"network_id": "<string>",
"network_name": "<string>",
"project_id": 123,
"protocol": "<string>",
"region": "<string>",
"region_id": 123,
"share_network_name": "File_share_test-sfs_network",
"share_settings": {
"type_name": "<string>"
},
"size": 2,
"status": "available",
"subnet_id": "<string>",
"subnet_name": "<string>",
"tags": [
{
"key": "<string>",
"read_only": true,
"value": "<string>"
}
],
"task_id": "22b1eau7-8641-4ae9-9n20-9e0b5fcd2gca",
"type_name": "standard",
"volume_type": "default_share_type"
}
]
}API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Optional. Limit the number of returned items
x <= 1000File share name. Uses partial match.
Optional. Offset value is used to exclude the first set of records from the result
x >= 0File share type name
standard, vast OK
Number of objects
x >= 0Objects
Show child attributes
Connection point. Can be null during File share creation
"10.254.0.43:/shares/share-7c14ca01-ea5e-4d85-a6e2-c104fe6b561a"
Datetime when the file share was created
Task that created this entity
File share ID
File share name
Network ID.
Network name.
Project ID
File share protocol
Region name
Region ID
Share network name. May be null if the file share was created with volume type VAST
"File_share_test-sfs_network"
Share settings specific to the file share type
Show child attributes
Standard file share type
"standard"File share size in GiB
x >= 1File share status
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.
Subnet name.
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.
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.
"22b1eau7-8641-4ae9-9n20-9e0b5fcd2gca"
File share type name
standard, vast Deprecated. Use type_name instead. File share disk type
default_share_type, vast_share_type Was this page helpful?