Skip to main content

shares

Creates, updates, deletes, gets or lists a shares resource.

Overview

Nameshares
TypeResource
Idazure.data_box_edge.shares

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
accessProtocolstringAccess protocol to be used by the share. Required. Known values are: "SMB" and "NFS". (SMB, NFS)
azureContainerInfoobjectAzure container mapping for the share.
clientAccessRightsarrayList of IP addresses and corresponding access rights on the share(required for NFS protocol).
dataPolicystringData policy of the share. Known values are: "Cloud" and "Local". (Cloud, Local)
descriptionstringDescription for the share.
monitoringStatusstringCurrent monitoring status of the share. Required. Known values are: "Enabled" and "Disabled". (Enabled, Disabled)
refreshDetailsobjectDetails of the refresh job on this share.
shareMappingsarrayShare mount point to the role.
shareStatusstringCurrent status of the share. Required. Known values are: "Offline", "Unknown", "OK", "Updating", and "NeedsAttention". (Offline, Unknown, OK, Updating, NeedsAttention)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
userAccessRightsarrayMapping of users and corresponding access rights on the share (required for SMB protocol).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdevice_name, name, resource_group_name, subscription_idGets a share by name. Gets a share by name.
list_by_data_box_edge_deviceselectdevice_name, resource_group_name, subscription_idLists all the shares in a Data Box Edge/Data Box Gateway device. Lists all the shares in a Data Box Edge/Data Box Gateway device.
create_or_updateinsertdevice_name, name, resource_group_name, subscription_id, propertiesCreates a new share or updates an existing share on the device. Creates a new share or updates an existing share on the device.
create_or_updatereplacedevice_name, name, resource_group_name, subscription_id, propertiesCreates a new share or updates an existing share on the device. Creates a new share or updates an existing share on the device.
deletedeletedevice_name, name, resource_group_name, subscription_idDeletes the share on the Data Box Edge/Data Box Gateway device.
refreshexecdevice_name, name, resource_group_name, subscription_idRefreshes the share metadata with the data from the cloud. Refreshes the share metadata with the data from the cloud.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
device_namestringThe device name. Required.
namestringThe share name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets a share by name. Gets a share by name.

SELECT
id,
name,
accessProtocol,
azureContainerInfo,
clientAccessRights,
dataPolicy,
description,
monitoringStatus,
refreshDetails,
shareMappings,
shareStatus,
systemData,
type,
userAccessRights
FROM azure.data_box_edge.shares
WHERE device_name = '{{ device_name }}' -- required
AND name = '{{ name }}' -- required
AND resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new share or updates an existing share on the device. Creates a new share or updates an existing share on the device.

INSERT INTO azure.data_box_edge.shares (
properties,
device_name,
name,
resource_group_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ device_name }}',
'{{ name }}',
'{{ resource_group_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Creates a new share or updates an existing share on the device. Creates a new share or updates an existing share on the device.

REPLACE azure.data_box_edge.shares
SET
properties = '{{ properties }}'
WHERE
device_name = '{{ device_name }}' --required
AND name = '{{ name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes the share on the Data Box Edge/Data Box Gateway device.

DELETE FROM azure.data_box_edge.shares
WHERE device_name = '{{ device_name }}' --required
AND name = '{{ name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Refreshes the share metadata with the data from the cloud. Refreshes the share metadata with the data from the cloud.

EXEC azure.data_box_edge.shares.refresh 
@device_name='{{ device_name }}' --required,
@name='{{ name }}' --required,
@resource_group_name='{{ resource_group_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;