Explore the Create request in the Service Fabric Mesh API
Creates or updates a volume resource.
Creates a volume resource with the specified name and description. If a volume with the same name already exists, then its description is updated to the one indicated in this request.
Request
Method | Request URI |
---|---|
PUT | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeName}?api-version=2018-07-01-preview |
Parameters
Name | Type | Required | Location |
---|---|---|---|
subscriptionId |
string | Yes | Path |
resourceGroupName |
string | Yes | Path |
volumeName |
string | Yes | Path |
api-version |
string | Yes | Query |
volumeResourceDescription |
VolumeResourceDescription | Yes | Body |
subscriptionId
Type: string
Required: Yes
The customer subscription identifier
resourceGroupName
Type: string
Required: Yes
Azure resource group name
volumeName
Type: string
Required: Yes
The identity of the volume.
api-version
Type: string
Required: Yes
Default: 2018-07-01-preview
The version of the API. This parameter is required and its value must be 2018-07-01-preview
.
volumeResourceDescription
Type: VolumeResourceDescription
Required: Yes
Description for creating a volume resource.
Responses
HTTP Status Code | Description | Response Schema |
---|---|---|
200 (OK) | Ok |
VolumeResourceDescription |
201 (Created) | Created |
VolumeResourceDescription |
All other status codes | Error |
ErrorModel |
Examples
VolumeCreate
Request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/volumes/sbzDemoVolume?api-version=2018-07-01-preview
Body
{
"properties": {
"description": "File share backed by Azure Files storage.",
"azureFileParameters": {
"accountName": "sbzdemoaccount",
"accountKey": "provide-account-key-here",
"shareName": "sharel"
},
"provider": "SFAzureFile"
},
"location": "eastus"
}
200 Response
Body
{
"type": "Microsoft.ServiceFabricMesh/volumes",
"location": "eastus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/volumes/sbzDemoVolume",
"name": "sbzDemoVolume",
"tags": {},
"properties": {
"provisioningState": "Succeeded",
"description": "File share backed by Azure Files storage.",
"provider": "SFAzureFile",
"azureFileParameters": {
"shareName": "sharel",
"accountName": "sbzdemoaccount"
}
}
}
201 Response
Body
{
"type": "Microsoft.ServiceFabricMesh/volumes",
"location": "eastus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/volumes/sbzDemoVolume",
"name": "sbzDemoVolume",
"tags": {},
"properties": {
"provisioningState": "Updating",
"description": "File share backed by Azure Files storage.",
"provider": "SFAzureFile",
"azureFileParameters": {
"shareName": "sharel",
"accountName": "sbzdemoaccount"
}
}
}