shares
Creates, updates, deletes, gets or lists a shares
resource.
Overview
Name | shares |
Type | Resource |
Id | azure.data_share.shares |
Fields
- vw_shares
- shares
Name | Datatype | Description |
---|---|---|
id | text | The resource id of the azure resource |
name | text | Name of the azure resource |
description | text | field from the properties object |
accountName | text | field from the properties object |
created_at | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
shareName | text | field from the properties object |
share_kind | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
terms | text | field from the properties object |
type | text | Type of the azure resource |
user_email | text | field from the properties object |
user_name | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | The resource id of the azure resource |
name | string | Name of the azure resource |
properties | object | Share property bag. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | Type of the azure resource |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, resourceGroupName, shareName, subscriptionId | Get a share |
list_by_account | SELECT | accountName, resourceGroupName, subscriptionId | List shares in an account |
create | INSERT | accountName, resourceGroupName, shareName, subscriptionId | Create a share |
delete | DELETE | accountName, resourceGroupName, shareName, subscriptionId | Delete a share |
SELECT
examples
List shares in an account
- vw_shares
- shares
SELECT
id,
name,
description,
accountName,
created_at,
provisioning_state,
resourceGroupName,
shareName,
share_kind,
subscriptionId,
system_data,
terms,
type,
user_email,
user_name
FROM azure.data_share.vw_shares
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
properties,
systemData,
type
FROM azure.data_share.shares
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new shares
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.data_share.shares (
accountName,
resourceGroupName,
shareName,
subscriptionId,
properties
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ shareName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: systemData
value:
- name: createdAt
value: string
- name: createdBy
value: string
- name: createdByType
value: string
- name: lastModifiedAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: type
value: string
- name: properties
value:
- name: createdAt
value: string
- name: description
value: string
- name: provisioningState
value: string
- name: shareKind
value: string
- name: terms
value: string
- name: userEmail
value: string
- name: userName
value: string
DELETE
example
Deletes the specified shares
resource.
/*+ delete */
DELETE FROM azure.data_share.shares
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND shareName = '{{ shareName }}'
AND subscriptionId = '{{ subscriptionId }}';