Skip to main content

shares

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

Overview

Nameshares
TypeResource
Idazure.data_share.shares

Fields

NameDatatypeDescription
idtextThe resource id of the azure resource
nametextName of the azure resource
descriptiontextfield from the properties object
accountNametextfield from the properties object
created_attextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
shareNametextfield from the properties object
share_kindtextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
termstextfield from the properties object
typetextType of the azure resource
user_emailtextfield from the properties object
user_nametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, resourceGroupName, shareName, subscriptionIdGet a share
list_by_accountSELECTaccountName, resourceGroupName, subscriptionIdList shares in an account
createINSERTaccountName, resourceGroupName, shareName, subscriptionIdCreate a share
deleteDELETEaccountName, resourceGroupName, shareName, subscriptionIdDelete a share

SELECT examples

List shares in an account

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new shares resource.

/*+ create */
INSERT INTO azure.data_share.shares (
accountName,
resourceGroupName,
shareName,
subscriptionId,
properties
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ shareName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

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 }}';