> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create file share



## OpenAPI

````yaml /api-reference/services_documented/cloud_api.yaml post /cloud/v1/file_shares/{project_id}/{region_id}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Cloud API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-14T07:00:22.640261+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Bare Metal
    x-displayName: Bare Metal
  - name: Container as a Service
    x-displayName: Container as a Service
  - name: Cost Reports
    x-displayName: Cost Reports
  - name: DDoS Protection
    x-displayName: DDoS Protection
  - name: Everywhere Inference
    x-displayName: Everywhere Inference
  - name: Everywhere Inference Apps
    x-displayName: Everywhere Inference Apps
  - name: File Shares
    x-displayName: File Shares
  - name: Floating IPs
    x-displayName: Floating IPs
  - name: Function as a Service
    x-displayName: Function as a Service
  - name: GPU Bare Metal
    x-displayName: GPU Bare Metal
  - name: GPU Virtual
    x-displayName: GPU Virtual
  - name: IP Ranges
    x-displayName: IP Ranges
  - name: Images
    x-displayName: Images
  - name: Instances
    x-displayName: Instances
  - name: Load Balancers
    x-displayName: Load Balancers
  - name: Logging
    x-displayName: Logging
  - name: Managed Kubernetes
    x-displayName: Managed Kubernetes
  - name: Managed PostgreSQL
    x-displayName: Managed PostgreSQL
  - name: Networks
    x-displayName: Networks
  - name: Placement Groups
    x-displayName: Placement Groups
  - name: Projects
    x-displayName: Projects
  - name: Quotas
    x-displayName: Quotas
  - name: Regions
    x-displayName: Regions
  - name: Registry
    x-displayName: Registry
  - name: Reservations
    x-displayName: Reservations
  - name: Reserved IPs
    x-displayName: Reserved IPs
  - name: Routers
    x-displayName: Routers
  - name: SSH Keys
    x-displayName: SSH Keys
  - name: Secrets
    x-displayName: Secrets
  - name: Security Groups
    x-displayName: Security Groups
  - name: Snapshot Schedules
    x-displayName: Snapshot Schedules
  - name: Snapshots
    x-displayName: Snapshots
  - name: Tasks
    x-displayName: Tasks
  - name: User Actions
    x-displayName: User Actions
  - name: User Role Assignments
    x-displayName: User Role Assignments
  - name: Volumes
    x-displayName: Volumes
paths:
  /cloud/v1/file_shares/{project_id}/{region_id}:
    post:
      tags:
        - File Shares
      summary: Create file share
      operationId: SfsViewSet.post
      parameters:
        - in: path
          name: project_id
          required: true
          description: Project ID
          schema:
            description: Project ID
            example: 1
            examples:
              - 1
            title: Project Id
            type: integer
        - in: path
          name: region_id
          required: true
          description: Region ID
          schema:
            description: Region ID
            example: 1
            examples:
              - 1
            title: Region Id
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFileShareSerializer'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIDsSerializer'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            task_id_list = client.cloud.file_shares.create(
                project_id=1,
                region_id=1,
                name="test-share-file-system",
                network={
                    "network_id": "024a29e9-b4b7-4c91-9a46-505be123d9f8"
                },
                protocol="NFS",
                size=5,
            )
            print(task_id_list.tasks)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/cloud\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttaskIDList, err := client.Cloud.FileShares.New(context.TODO(), cloud.FileShareNewParams{\n\t\tProjectID: gcore.Int(1),\n\t\tRegionID:  gcore.Int(1),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", taskIDList.Tasks)\n}\n"
components:
  schemas:
    CreateFileShareSerializer:
      oneOf:
        - $ref: '#/components/schemas/CreateStandardFileShareSerializer'
        - $ref: '#/components/schemas/CreateVastFileShareSerializer'
      title: CreateFileShareSerializer
    TaskIDsSerializer:
      properties:
        tasks:
          description: >-
            List of task IDs representing asynchronous operations. Use these IDs
            to monitor operation progress:

            - `GET /v1/tasks/{task_id}` - Check individual task status and
            details

            Poll task status until completion (`FINISHED`/`ERROR`) before
            proceeding with dependent operations.
          example:
            - d478ae29-dedc-4869-82f0-96104425f565
          examples:
            - - d478ae29-dedc-4869-82f0-96104425f565
          items:
            type: string
          title: Tasks
          type: array
      required:
        - tasks
      title: TaskIDsSerializer
      type: object
    CreateStandardFileShareSerializer:
      additionalProperties: false
      properties:
        access:
          default: []
          description: Access Rules
          example:
            - access_mode: ro
              ip_address: 10.0.0.1
          examples:
            - - access_mode: ro
                ip_address: 10.0.0.1
          items:
            $ref: '#/components/schemas/CreateAccessRuleSerializer'
          title: Access
          type: array
        name:
          description: File share name
          example: test-share-file-system
          examples:
            - test-share-file-system
          pattern: ^[a-zA-Z0-9][a-zA-Z 0-9._\-]{1,61}[a-zA-Z0-9._]$
          title: Name
          type: string
        network:
          $ref: '#/components/schemas/FileShareNetworkSerializer'
          description: File share network configuration
        protocol:
          const: NFS
          description: File share protocol
          example: NFS
          examples:
            - NFS
          title: Protocol
          type: string
        size:
          description: File share size in GiB
          example: 5
          examples:
            - 5
          minimum: 1
          title: Size
          type: integer
        tags:
          $ref: '#/components/schemas/CreateTagsSerializer'
          description: >-
            Key-value tags to associate 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. Both
            tag keys and values have a maximum length of 255 characters. 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:
            - my-tag: my-tag-value
          x-stainless-terraform-configurability: computed_optional
        type_name:
          const: standard
          default: standard
          description: Standard file share type
          title: Type Name
          type: string
        volume_type:
          const: default_share_type
          default: default_share_type
          deprecated: true
          description: Deprecated. Use `type_name` instead.
          title: Volume Type
          type: string
      required:
        - name
        - protocol
        - size
        - network
      title: CreateStandardFileShareSerializer
      type: object
    CreateVastFileShareSerializer:
      additionalProperties: false
      properties:
        name:
          description: File share name
          example: test-share-file-system
          examples:
            - test-share-file-system
          pattern: ^[a-zA-Z0-9][a-zA-Z 0-9._\-]{1,61}[a-zA-Z0-9._]$
          title: Name
          type: string
        protocol:
          const: NFS
          description: File share protocol
          example: NFS
          examples:
            - NFS
          title: Protocol
          type: string
        share_settings:
          $ref: '#/components/schemas/VastFileShareSettingsInputSerializer'
          description: Configuration settings for the share
        size:
          description: File share size in GiB
          example: 5
          examples:
            - 5
          minimum: 1
          title: Size
          type: integer
        tags:
          $ref: '#/components/schemas/CreateTagsSerializer'
          description: >-
            Key-value tags to associate 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. Both
            tag keys and values have a maximum length of 255 characters. 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:
            - my-tag: my-tag-value
        type_name:
          const: vast
          default: vast
          description: Vast file share type
          title: Type Name
          type: string
        volume_type:
          const: vast_share_type
          default: vast_share_type
          deprecated: true
          description: Deprecated. Use `type_name` instead.
          title: Volume Type
          type: string
      required:
        - name
        - protocol
        - size
      title: CreateVastFileShareSerializer
      type: object
    CreateAccessRuleSerializer:
      properties:
        access_mode:
          $ref: '#/components/schemas/AccessLevelChoices'
          description: Access mode
          examples:
            - ro
        ip_address:
          anyOf:
            - format: ipvanyaddress
              type: string
            - format: ipvanynetwork
              type: string
          description: Source IP or network
          examples:
            - 192.168.1.1
            - 2001:db8::1
            - 10.0.0.0/24
            - fd00::/8
            - 0.0.0.0/0
            - '::/0'
          title: Ip Address
      required:
        - access_mode
        - ip_address
      title: CreateAccessRuleSerializer
      type: object
    FileShareNetworkSerializer:
      properties:
        network_id:
          description: Network ID.
          example: 024a29e9-b4b7-4c91-9a46-505be123d9f8
          examples:
            - 024a29e9-b4b7-4c91-9a46-505be123d9f8
          format: uuid4
          title: Network Id
          type: string
        subnet_id:
          description: >-
            Subnetwork ID. If the subnet is not selected, it will be selected
            automatically.
          example: 91200a6c-07e0-42aa-98da-32d1f6545ae7
          examples:
            - 91200a6c-07e0-42aa-98da-32d1f6545ae7
          format: uuid4
          title: Subnet Id
          type: string
      required:
        - network_id
      title: FileShareNetworkSerializer
      type: object
    CreateTagsSerializer:
      description: >-
        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.
      patternProperties:
        ^[^\s=]+$:
          description: >-
            Tag value. Maximum 255 characters. Cannot contain tabs, newlines,
            empty string or start/end with whitespace.
          example: my-tag-value
          examples:
            - my-tag-value
          maxLength: 255
          minLength: 1
          pattern: ^[^ \t\n\r\f\v]([^\t\n\r\f\v]*[^ \t\n\r\f\v])?$
          type: string
      propertyNames:
        description: >-
          Tag key. Maximum 255 characters. Cannot contain spaces, tabs,
          newlines, empty string or '=' character.
        examples:
          - my-tag
        maxLength: 255
        minLength: 1
      title: CreateTagsSerializer
      type: object
    VastFileShareSettingsInputSerializer:
      additionalProperties: false
      properties:
        allowed_characters:
          description: >-
            Determines which characters are allowed in file names. Choose
            between:

            - Lowest Common Denominator (LCD), allows only characters allowed by
            all VAST Cluster-supported protocols

            - Native Protocol Limit (NPL), imposes no limitation beyond that of
            the client protocol.
          enum:
            - LCD
            - NPL
          example: LCD
          examples:
            - LCD
          title: Allowed Characters
          type: string
          x-stainless-terraform-configurability: computed_optional
        path_length:
          description: >-
            Affects the maximum limit of file path component name length. Choose
            between:

            - Lowest Common Denominator (LCD), imposes the lowest common
            denominator file length limit of all VAST Cluster-supported
            protocols. With this (default) option, the limitation on the length
            of a single component of the path is 255 characters

            - Native Protocol Limit (NPL), imposes no limitation beyond that of
            the client protocol.
          enum:
            - LCD
            - NPL
          example: LCD
          examples:
            - LCD
          title: Path Length
          type: string
          x-stainless-terraform-configurability: computed_optional
        root_squash:
          default: true
          description: >-
            Enables or disables root squash for NFS clients.

            - If `true` (default), root squash is enabled: the root user is
            mapped to nobody for all file and folder management operations on
            the export.

            - If `false`, root squash is disabled: the NFS client `root` user
            retains root privileges. Use this option if you trust the root user
            not to perform operations that will corrupt data.
          example: true
          examples:
            - true
          title: Root Squash
          type: boolean
      title: VastFileShareSettingsInputSerializer
      type: object
    AccessLevelChoices:
      enum:
        - ro
        - rw
      title: AccessLevelChoices
      type: string
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````