Skip to main content

local_users

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

Overview

Namelocal_users
TypeResource
Idazure.storage.local_users

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the resource
accountNametextfield from the properties object
allow_acl_authorizationtextfield from the properties object
extended_groupstextfield from the properties object
group_idtextfield from the properties object
has_shared_keytextfield from the properties object
has_ssh_keytextfield from the properties object
has_ssh_passwordtextfield from the properties object
home_directorytextfield from the properties object
is_nf_sv3_enabledtextfield from the properties object
permission_scopestextfield from the properties object
resourceGroupNametextfield from the properties object
sidtextfield from the properties object
ssh_authorized_keystextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
user_idtextfield from the properties object
usernametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, resourceGroupName, subscriptionId, usernameGet the local user of the storage account by username.
listSELECTaccountName, resourceGroupName, subscriptionIdList the local users associated with the storage account.
create_or_updateINSERTaccountName, resourceGroupName, subscriptionId, usernameCreate or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties.
deleteDELETEaccountName, resourceGroupName, subscriptionId, usernameDeletes the local user associated with the specified storage account.
regenerate_passwordEXECaccountName, resourceGroupName, subscriptionId, usernameRegenerate the local user SSH password.

SELECT examples

List the local users associated with the storage account.

SELECT
id,
name,
accountName,
allow_acl_authorization,
extended_groups,
group_id,
has_shared_key,
has_ssh_key,
has_ssh_password,
home_directory,
is_nf_sv3_enabled,
permission_scopes,
resourceGroupName,
sid,
ssh_authorized_keys,
subscriptionId,
system_data,
type,
user_id,
username
FROM azure.storage.vw_local_users
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.storage.local_users (
accountName,
resourceGroupName,
subscriptionId,
username,
properties,
systemData
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ username }}',
'{{ properties }}',
'{{ systemData }}'
;

DELETE example

Deletes the specified local_users resource.

/*+ delete */
DELETE FROM azure.storage.local_users
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND username = '{{ username }}';