Skip to main content

accounts

Creates, updates, deletes, gets or lists an accounts resource.

Overview

Nameaccounts
TypeResource
Idazure.data_share.accounts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe resource id of the azure resource.
namestringName of the azure resource.
createdAtstring (date-time)Time at which the account was created.
identityobjectIdentity Info on the Account. Required.
locationstringLocation of the azure resource.
provisioningStatestringProvisioning state of the Account. Known values are: "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
systemDataobjectSystem Data of the Azure resource.
tagsobjectTags on the azure resource.
typestringType of the azure resource.
userEmailstringEmail of the user who created the resource.
userNamestringName of the user who created the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, subscription_idGet an account under a resource group. Get an account.
list_by_resource_groupselectresource_group_name, subscription_id$skipTokenList Accounts in a resource group. List Accounts in ResourceGroup.
list_by_subscriptionselectsubscription_id$skipTokenList Accounts in a subscription. List Accounts in Subscription.
createinsertresource_group_name, account_name, subscription_id, identityCreate an account in the given resource group. Create an account.
updateupdateresource_group_name, account_name, subscription_idPatch a given account. Patch an account.
deletedeleteresource_group_name, account_name, subscription_idDelete an account. DeleteAccount.

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
account_namestringThe name of the share account. Required.
resource_group_namestringThe resource group name. Required.
subscription_idstring
$skipTokenstringContinuation token. Default value is None.

SELECT examples

Get an account under a resource group. Get an account.

SELECT
id,
name,
createdAt,
identity,
location,
provisioningState,
systemData,
tags,
type,
userEmail,
userName
FROM azure.data_share.accounts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create an account in the given resource group. Create an account.

INSERT INTO azure.data_share.accounts (
location,
tags,
identity,
resource_group_name,
account_name,
subscription_id
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ identity }}' /* required */,
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Patch a given account. Patch an account.

UPDATE azure.data_share.accounts
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete an account. DeleteAccount.

DELETE FROM azure.data_share.accounts
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;