# Storage & Backup › File Storage › Enterprise File Storage › Share Management API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Storage & Backup product's sections: https://developers.eu.ovhcloud.com/reference/storage-backup/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 7 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/share-management/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/storage-backup/file-storage/enterprise-file-storage/share-management.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/storage-backup/file-storage/enterprise-file-storage/share-management.json?format=openapi3

## Operations

- `GET /storage/netapp/{serviceName}/share` — List shares
- `GET /storage/netapp/{serviceName}/share/{shareId}` — Get a share
- `POST /storage/netapp/{serviceName}/share` — Create a share
- `POST /storage/netapp/{serviceName}/share/{shareId}/extend` — Extend a share
- `POST /storage/netapp/{serviceName}/share/{shareId}/shrink` — Shrink a share
- `PUT /storage/netapp/{serviceName}/share/{shareId}` — Update a share
- `DELETE /storage/netapp/{serviceName}/share/{shareId}` — Delete a share

## List shares

`GET /1.0/storage/netapp/{serviceName}/share`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/share-management/#get-storage-netapp-servicename-share

**Status:** Stable production version  
**IAM actions:** `storageNetApp:apiovh:share/get`

Returns the ID and name of each share of the service. Set `detail` to true to get all share properties.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `detail` | query | boolean |  | Get detailed information about each share |
| `mountPointName` | query | string |  | If specified, returns only shares with given mount point name |
| `serviceName` | path | string (uuid) | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | storage.NetAppShare[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessMode` | storage.NetAppShareAccessModeEnum | read-only | Share access mode — one of `ro`, `rw` |
| `createdAt` | string (date-time) | read-only | Share creation date |
| `description` | string |  | Share description |
| `id` | string (uuid) | read-only | Share ID |
| `mountPointName` | string |  | User-defined name used to generate human readable access path for the share |
| `name` | string |  | Share name |
| `protocol` | storage.ProtocolEnum | yes | Share protocol — one of `NFS` |
| `size` | integer | yes | Share size in GiB |
| `snapshotID` | string |  | Snapshot ID used to create the share |
| `status` | storage.NetAppShareStatusEnum | read-only | Share status — one of `available`, `awaiting_replication`, `creating`, `creating_from_snapshot`, `deleted`, `deleting`, `error`, `error_deleting`, `extending`, `extending_error`, `inactive`, `manage_error`, … |

```json
[
  {
    "accessMode": "ro",
    "createdAt": "2024-01-01T12:00:00Z",
    "description": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "mountPointName": "string",
    "name": "string",
    "protocol": "NFS",
    "size": 0,
    "snapshotID": "string",
    "status": "available"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/storage/netapp/{serviceName}/share")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/storage/netapp/{serviceName}/share");

print_r($result);
?>
```

## Get a share

`GET /1.0/storage/netapp/{serviceName}/share/{shareId}`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/share-management/#get-storage-netapp-servicename-share-shareid

**Status:** Stable production version  
**IAM actions:** `storageNetApp:apiovh:share/get`

Returns the share properties, its status and its access mode. To get the paths used to mount the share, list its access paths.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | storage.NetAppShare | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessMode` | storage.NetAppShareAccessModeEnum | read-only | Share access mode — one of `ro`, `rw` |
| `createdAt` | string (date-time) | read-only | Share creation date |
| `description` | string |  | Share description |
| `id` | string (uuid) | read-only | Share ID |
| `mountPointName` | string |  | User-defined name used to generate human readable access path for the share |
| `name` | string |  | Share name |
| `protocol` | storage.ProtocolEnum | yes | Share protocol — one of `NFS` |
| `size` | integer | yes | Share size in GiB |
| `snapshotID` | string |  | Snapshot ID used to create the share |
| `status` | storage.NetAppShareStatusEnum | read-only | Share status — one of `available`, `awaiting_replication`, `creating`, `creating_from_snapshot`, `deleted`, `deleting`, `error`, `error_deleting`, `extending`, `extending_error`, `inactive`, `manage_error`, … |

```json
{
  "accessMode": "ro",
  "createdAt": "2024-01-01T12:00:00Z",
  "description": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "mountPointName": "string",
  "name": "string",
  "protocol": "NFS",
  "size": 0,
  "snapshotID": "string",
  "status": "available"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/storage/netapp/{serviceName}/share/{shareId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/storage/netapp/{serviceName}/share/{shareId}");

print_r($result);
?>
```

## Create a share

`POST /1.0/storage/netapp/{serviceName}/share`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/share-management/#post-storage-netapp-servicename-share

**Status:** Stable production version  
**IAM actions:** `storageNetApp:apiovh:share/create`

Creates an NFS share, empty or from a manual snapshot, in which case the share must be at least the size of the snapshot. Creation is asynchronous: the share is returned with status creating, follow its status until available. The total size of the shares cannot exceed the service capacity.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string (uuid) | yes | Service name |

### Request body (required)

Type: `storage.NetAppShare`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessMode` | storage.NetAppShareAccessModeEnum | read-only | Share access mode — one of `ro`, `rw` |
| `createdAt` | string (date-time) | read-only | Share creation date |
| `description` | string |  | Share description |
| `id` | string (uuid) | read-only | Share ID |
| `mountPointName` | string |  | User-defined name used to generate human readable access path for the share |
| `name` | string |  | Share name |
| `protocol` | storage.ProtocolEnum | yes | Share protocol — one of `NFS` |
| `size` | integer | yes | Share size in GiB |
| `snapshotID` | string |  | Snapshot ID used to create the share |
| `status` | storage.NetAppShareStatusEnum | read-only | Share status — one of `available`, `awaiting_replication`, `creating`, `creating_from_snapshot`, `deleted`, `deleting`, `error`, `error_deleting`, `extending`, `extending_error`, `inactive`, `manage_error`, … |

```json
{
  "description": "string",
  "mountPointName": "string",
  "name": "string",
  "protocol": "NFS",
  "size": 0,
  "snapshotID": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | storage.NetAppShare | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessMode` | storage.NetAppShareAccessModeEnum | read-only | Share access mode — one of `ro`, `rw` |
| `createdAt` | string (date-time) | read-only | Share creation date |
| `description` | string |  | Share description |
| `id` | string (uuid) | read-only | Share ID |
| `mountPointName` | string |  | User-defined name used to generate human readable access path for the share |
| `name` | string |  | Share name |
| `protocol` | storage.ProtocolEnum | yes | Share protocol — one of `NFS` |
| `size` | integer | yes | Share size in GiB |
| `snapshotID` | string |  | Snapshot ID used to create the share |
| `status` | storage.NetAppShareStatusEnum | read-only | Share status — one of `available`, `awaiting_replication`, `creating`, `creating_from_snapshot`, `deleted`, `deleting`, `error`, `error_deleting`, `extending`, `extending_error`, `inactive`, `manage_error`, … |

```json
{
  "accessMode": "ro",
  "createdAt": "2024-01-01T12:00:00Z",
  "description": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "mountPointName": "string",
  "name": "string",
  "protocol": "NFS",
  "size": 0,
  "snapshotID": "string",
  "status": "available"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: storage.NetAppShare
result = client.post("/storage/netapp/{serviceName}/share",
	description = None, # Share description (type: string, nullable)
	mountPointName = None, # User-defined name used to generate human readable access path for the share (type: string, nullable)
	name = None, # Share name (type: string, nullable)
	protocol = None, # Share protocol (type: storage.ProtocolEnum, nullable)
	size = None, # Share size in GiB (type: integer, nullable)
	snapshotID = None, # Snapshot ID used to create the share (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: storage.NetAppShare
$result = $ovh->post("/storage/netapp/{serviceName}/share", array(
	description => null, // Share description (type: string, nullable)
	mountPointName => null, // User-defined name used to generate human readable access path for the share (type: string, nullable)
	name => null, // Share name (type: string, nullable)
	protocol => null, // Share protocol (type: storage.ProtocolEnum, nullable)
	size => null, // Share size in GiB (type: integer, nullable)
	snapshotID => null, // Snapshot ID used to create the share (type: string, nullable)
));

print_r($result);
?>
```

## Extend a share

`POST /1.0/storage/netapp/{serviceName}/share/{shareId}/extend`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/share-management/#post-storage-netapp-servicename-share-shareid-extend

**Status:** Stable production version  
**IAM actions:** `storageNetApp:apiovh:share/extend`

Increases the share to the given size in GB, which must be greater than its current size. The share must be available, and the change is asynchronous: its status moves to extending, then back to available, or to extending_error if it fails.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Request body (required)

Type: `storage.NetAppShareExtendOrShrink`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `size` | integer | yes | Share size in GiB |

```json
{
  "size": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}/extend" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: storage.NetAppShareExtendOrShrink
result = client.post("/storage/netapp/{serviceName}/share/{shareId}/extend",
	size = None, # Share size in GiB (type: integer, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: storage.NetAppShareExtendOrShrink
$result = $ovh->post("/storage/netapp/{serviceName}/share/{shareId}/extend", array(
	size => null, // Share size in GiB (type: integer, nullable)
));

print_r($result);
?>
```

## Shrink a share

`POST /1.0/storage/netapp/{serviceName}/share/{shareId}/shrink`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/share-management/#post-storage-netapp-servicename-share-shareid-shrink

**Status:** Stable production version  
**IAM actions:** `storageNetApp:apiovh:share/shrink`

Reduces the share to the given size in GB, which must be smaller than its current size. The share must be available, and the change is asynchronous: follow the share status until it is available again. If the new size is smaller than the space already used, the share keeps its current size.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Request body (required)

Type: `storage.NetAppShareExtendOrShrink`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `size` | integer | yes | Share size in GiB |

```json
{
  "size": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}/shrink" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: storage.NetAppShareExtendOrShrink
result = client.post("/storage/netapp/{serviceName}/share/{shareId}/shrink",
	size = None, # Share size in GiB (type: integer, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: storage.NetAppShareExtendOrShrink
$result = $ovh->post("/storage/netapp/{serviceName}/share/{shareId}/shrink", array(
	size => null, // Share size in GiB (type: integer, nullable)
));

print_r($result);
?>
```

## Update a share

`PUT /1.0/storage/netapp/{serviceName}/share/{shareId}`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/share-management/#put-storage-netapp-servicename-share-shareid

**Status:** Stable production version  
**IAM actions:** `storageNetApp:apiovh:share/edit`

Updates the share name and description. To change the size, use *Extend a share* or *Shrink a share*.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Request body (required)

Type: `storage.NetAppShareUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | New share description |
| `name` | string |  | New share name |

```json
{
  "description": "string",
  "name": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | storage.NetAppShare | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessMode` | storage.NetAppShareAccessModeEnum | read-only | Share access mode — one of `ro`, `rw` |
| `createdAt` | string (date-time) | read-only | Share creation date |
| `description` | string |  | Share description |
| `id` | string (uuid) | read-only | Share ID |
| `mountPointName` | string |  | User-defined name used to generate human readable access path for the share |
| `name` | string |  | Share name |
| `protocol` | storage.ProtocolEnum | yes | Share protocol — one of `NFS` |
| `size` | integer | yes | Share size in GiB |
| `snapshotID` | string |  | Snapshot ID used to create the share |
| `status` | storage.NetAppShareStatusEnum | read-only | Share status — one of `available`, `awaiting_replication`, `creating`, `creating_from_snapshot`, `deleted`, `deleting`, `error`, `error_deleting`, `extending`, `extending_error`, `inactive`, `manage_error`, … |

```json
{
  "accessMode": "ro",
  "createdAt": "2024-01-01T12:00:00Z",
  "description": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "mountPointName": "string",
  "name": "string",
  "protocol": "NFS",
  "size": 0,
  "snapshotID": "string",
  "status": "available"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: storage.NetAppShareUpdate
result = client.put("/storage/netapp/{serviceName}/share/{shareId}",
	description = None, # New share description (type: string, nullable)
	name = None, # New share name (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: storage.NetAppShareUpdate
$result = $ovh->put("/storage/netapp/{serviceName}/share/{shareId}", array(
	description => null, // New share description (type: string, nullable)
	name => null, // New share name (type: string, nullable)
));

print_r($result);
?>
```

## Delete a share

`DELETE /1.0/storage/netapp/{serviceName}/share/{shareId}`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/share-management/#delete-storage-netapp-servicename-share-shareid

**Status:** Stable production version  
**IAM actions:** `storageNetApp:apiovh:share/delete`

Permanently deletes the share and its ACLs. Deletion is asynchronous. Delete the snapshots and replications of the share first.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/storage/netapp/{serviceName}/share/{shareId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/storage/netapp/{serviceName}/share/{shareId}");

print_r($result);
?>
```
