shares
Creates, updates, deletes, gets or lists a shares resource.
Overview
| Name | shares |
| Type | Resource |
| Id | azure.data_box_edge.shares |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_data_box_edge_device
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accessProtocol | string | Access protocol to be used by the share. Required. Known values are: "SMB" and "NFS". (SMB, NFS) |
azureContainerInfo | object | Azure container mapping for the share. |
clientAccessRights | array | List of IP addresses and corresponding access rights on the share(required for NFS protocol). |
dataPolicy | string | Data policy of the share. Known values are: "Cloud" and "Local". (Cloud, Local) |
description | string | Description for the share. |
monitoringStatus | string | Current monitoring status of the share. Required. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
refreshDetails | object | Details of the refresh job on this share. |
shareMappings | array | Share mount point to the role. |
shareStatus | string | Current status of the share. Required. Known values are: "Offline", "Unknown", "OK", "Updating", and "NeedsAttention". (Offline, Unknown, OK, Updating, NeedsAttention) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userAccessRights | array | Mapping of users and corresponding access rights on the share (required for SMB protocol). |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accessProtocol | string | Access protocol to be used by the share. Required. Known values are: "SMB" and "NFS". (SMB, NFS) |
azureContainerInfo | object | Azure container mapping for the share. |
clientAccessRights | array | List of IP addresses and corresponding access rights on the share(required for NFS protocol). |
dataPolicy | string | Data policy of the share. Known values are: "Cloud" and "Local". (Cloud, Local) |
description | string | Description for the share. |
monitoringStatus | string | Current monitoring status of the share. Required. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
refreshDetails | object | Details of the refresh job on this share. |
shareMappings | array | Share mount point to the role. |
shareStatus | string | Current status of the share. Required. Known values are: "Offline", "Unknown", "OK", "Updating", and "NeedsAttention". (Offline, Unknown, OK, Updating, NeedsAttention) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userAccessRights | array | Mapping of users and corresponding access rights on the share (required for SMB protocol). |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | device_name, name, resource_group_name, subscription_id | Gets a share by name. Gets a share by name. | |
list_by_data_box_edge_device | select | device_name, resource_group_name, subscription_id | Lists 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_update | insert | device_name, name, resource_group_name, subscription_id, properties | Creates 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_update | replace | device_name, name, resource_group_name, subscription_id, properties | Creates a new share or updates an existing share on the device. Creates a new share or updates an existing share on the device. | |
delete | delete | device_name, name, resource_group_name, subscription_id | Deletes the share on the Data Box Edge/Data Box Gateway device. | |
refresh | exec | device_name, name, resource_group_name, subscription_id | Refreshes 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.
| Name | Datatype | Description |
|---|---|---|
device_name | string | The device name. Required. |
name | string | The share name. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_data_box_edge_device
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
;
Lists 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.
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 resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: shares
props:
- name: device_name
value: "{{ device_name }}"
description: Required parameter for the shares resource.
- name: name
value: "{{ name }}"
description: Required parameter for the shares resource.
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the shares resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the shares resource.
- name: properties
description: |
The share properties. Required.
value:
description: "{{ description }}"
shareStatus: "{{ shareStatus }}"
monitoringStatus: "{{ monitoringStatus }}"
azureContainerInfo:
storageAccountCredentialId: "{{ storageAccountCredentialId }}"
containerName: "{{ containerName }}"
dataFormat: "{{ dataFormat }}"
accessProtocol: "{{ accessProtocol }}"
userAccessRights:
- userId: "{{ userId }}"
accessType: "{{ accessType }}"
clientAccessRights:
- client: "{{ client }}"
accessPermission: "{{ accessPermission }}"
refreshDetails:
inProgressRefreshJobId: "{{ inProgressRefreshJobId }}"
lastCompletedRefreshJobTimeInUTC: "{{ lastCompletedRefreshJobTimeInUTC }}"
errorManifestFile: "{{ errorManifestFile }}"
lastJob: "{{ lastJob }}"
shareMappings:
- shareId: "{{ shareId }}"
roleId: "{{ roleId }}"
mountPoint: "{{ mountPoint }}"
mountType: "{{ mountType }}"
roleType: "{{ roleType }}"
dataPolicy: "{{ dataPolicy }}"
REPLACE examples
- create_or_update
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
- delete
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
- refresh
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
;