• Scalable File Service

sfs
  1. Help Center
  2. Scalable File Service
  3. API Reference
  4. SFS APIs
  5. File Sharing
  6. Modifying a Shared File System

Modifying a Shared File System

Function

This interface is used to modify the name and description of a shared file system.

URI

  • PUT /v2/{project_id}/shares/{share_id}
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    share_id

    Yes

    string

    Specifies the UUID of the shared file system.

    project_id

    Yes

    string

    Specifies a project ID in a multi-project scenario.

Request

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    share

    Yes

    object

    Specifies the share object.

  • Description of field share

    Parameter

    Mandatory

    Type

    Description

    display_name

    Yes

    string

    Specifies the new name of the shared file system. The value consists of 1 to 255 characters.

    display_description

    No

    string

    Describes the shared file system. The value contains 0 to 255 characters.

    is_public

    No

    boolean

    (Supported since API v2.8). Specifies whether a file system can be publicly seen. If it is set to true, the file system can be seen publicly. If it is set to false, the file system can be seen privately. The default value is false.

  • Example request
    {
        "share": {
            "display_name": "testshare",
            "display_description": "test"
        }
    }

Response

  • Parameter description

    Parameter

    Type

    Description

    share

    object

    Specifies the share object.

  • Description of field share

    Parameter

    Type

    Description

    links

    array

    Specifies the share links.

    availability_zone

    string

    Specifies the availability zone.

    share_server_id

    string

    Specifies the UUID for managing share services.

    share_network_id

    string

    Specifies the UUID of the share network. This parameter is reserved, because share network management is not supported currently.

    snapshot_id

    string

    Specifies the UUID of the source snapshot that is used to create the shared file system. This parameter is reserved, because snapshots are not supported currently.

    snapshot_support

    boolean

    Specifies whether snapshots are supported. This parameter is reserved, because snapshots are not supported currently.

    id

    string

    Specifies the UUID of the shared file system.

    size

    integer

    Specifies the size (GB) of the shared file system.

    share_group_id

    string

    (Supported since API v2.31) Specifies the UUID of a consistency group. Currently, the consistency group is not supported. This field is reserved.

    project_id

    string

    Specifies the UUID of the project to which the shared file system belongs.

    metadata

    object

    Sets one or more metadata key and value pairs as a dictionary of strings. share_used is the key, and the corresponding value is the used capacity of the shared file system in the unit of Bytes.

    status

    string

    Specifies the status of the shared file system.

    task_state

    string

    Specifies the data migration status. This parameter is reserved, because data migration is not supported currently.

    has_replicas

    boolean

    (Supported since API v2.11) Specifies whether any replication exists. Currently, replication is not supported. This field is reserved.

    replication_type

    string

    (Supported since API v2.11) Specifies the replication type. Currently, replication is not supported. This field is reserved.

    description

    string

    Describes the shared file system.

    host

    string

    Specifies the name of the host. This field is visible only to the administrator.

    name

    string

    Specifies the name of the shared file system.

    created_at

    string

    Specifies the date and time stamp when the shared file system was created.

    access_rules_status

    string

    (Supported by API v2.10 to API v2.27)Specifies the configuration status of the access rule. Possible values are active (effective), error (configuration failed), and syncing (configuration in progress).

    share_proto

    string

    Specifies the protocol for sharing file systems.

    volume_type

    string

    Specifies the volume type. The definition of this parameter is the same as that of share_type.

    share_type_name

    string

    Specifies the storage service type assigned for the shared file system, such as high-performance storage (composed of SSDs) and large-capacity storage (composed of SATA disks).

    share_type

    string

    Specifies the UUID of the share type.

    export_locations

    array

    Lists the mount locations. Currently, only a single mount location is supported. This parameter exists only when X-Openstack-Manila-Api-Version specified in the request header is smaller than 2.8.

    export_location

    string

    Specifies the mount location. This parameter exists only when X-Openstack-Manila-Api-Version specified in the request header is smaller than 2.8.

    is_public

    bool

    (Supported since API v2.8). Specifies whether a file system can be publicly seen. If it is set to true, the file system can be seen publicly. If it is set to false, the file system can be seen privately. The default value is false.

    source_share_group_snapshot_member_id

    string

    (Supported since API v2.31) Specifies the UUID of a consistency snapshot source. Currently, the consistency group is not supported. This field is reserved.

    revert_to_snapshot_support

    boolean

    (Supported since API v2.27) Specifies whether reversion to snapshot is supported. Currently, snapshot is not supported. This field is reserved.

    create_share_from_snapshot_support

    boolean

    (Supported since API v2.24) Specifies whether creating file systems from snapshot is supported. Currently, snapshot is not supported. This field is reserved.

    mount_snapshot_support

    boolean

    (Supported since API v2.32) Specifies whether snapshot mounting is supported. Currently, snapshot is not supported. This field is reserved.

    user_id

    string

    (Supported since API v2.16) Specifies the user ID.

  • Example response
    {
      "share": {
        "status": "available",
        "share_type_name": "sla",
        "description": "test",
        "links": [
          {
            "href": "https://8.46.196.47:8796/v2/07412155bf474db9a2f697fd978593d7/shares/f26d867f-9876-433d-8db2-25d210f29309",
            "rel": "self"
          },
          {
            "href": "https://8.46.196.47:8796/07412155bf474db9a2f697fd978593d7/shares/f26d867f-9876-433d-8db2-25d210f29309",
            "rel": "bookmark"
          }
        ],
        "availability_zone": "az1.dc1",
        "share_network_id": null,
        "share_server_id": null,
        "share_group_id": null,
        "host": "DJ38@a4588256-3880-4136-b3c9-4c3aade8a84b#a4588256-3880-4136-b3c9-4c3aade8a84b",
        "revert_to_snapshot_support": null,
        "access_rules_status": "active",
        "snapshot_id": null,
        "create_share_from_snapshot_support": null,
        "is_public": true,
        "task_state": null,
        "snapshot_support": true,
        "id": "f26d867f-9876-433d-8db2-25d210f29309",
        "size": 1,
        "source_share_group_snapshot_member_id": null,
        "user_id": "daa3f8f8d7254465841da769298a76f6",
        "name": "manila share",
        "share_type": "8ae4e74e-83f4-4980-8ab8-e637f9294e0b",
        "has_replicas": false,
        "replication_type": null,
        "created_at": "2018-12-25T08:45:22.525899",
        "share_proto": "NFS",
        "volume_type": "sla",
        "mount_snapshot_support": null,
        "project_id": "07412155bf474db9a2f697fd978593d7",
        "metadata": {
          "share_key": "test",
          "share_used": "1",
        }
      }
    }

Status Codes

  • Normal

    200

  • Abnormal

    Status Code

    Description

    400 Bad Request

    The server failed to process the request.

    401 Unauthorized

    You must enter a username and the password to access the requested page.

    403 Forbidden

    You are forbidden to access the requested page.

    404 Not Found

    The requested page was not found.

    405 Method Not Allowed

    You are not allowed to use the method specified in the request.

    406 Not Acceptable

    The response generated by the server could not be accepted by the client.

    407 Proxy Authentication Required

    You must use the proxy server for authentication. Then the request can be processed.

    408 Request Timeout

    The request timed out.

    409 Conflict

    The request could not be processed due to a conflict.

    500 Internal Server Error

    Failed to complete the request because of an internal service error.

    501 Not Implemented

    Failed to complete the request because the server does not support the requested function.

    502 Bad Gateway

    Failed to complete the request because the request is invalid.

    503 Service Unavailable

    Failed to complete the request because the service is unavailable.

    504 Gateway Timeout

    A gateway timeout error occurred.