local_users
Creates, updates, deletes, gets or lists a local_users
resource.
Overview
Name | local_users |
Type | Resource |
Id | azure.storage.local_users |
Fields
- vw_local_users
- local_users
Name | Datatype | Description |
---|---|---|
id | text | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | text | The name of the resource |
accountName | text | field from the properties object |
allow_acl_authorization | text | field from the properties object |
extended_groups | text | field from the properties object |
group_id | text | field from the properties object |
has_shared_key | text | field from the properties object |
has_ssh_key | text | field from the properties object |
has_ssh_password | text | field from the properties object |
home_directory | text | field from the properties object |
is_nf_sv3_enabled | text | field from the properties object |
permission_scopes | text | field from the properties object |
resourceGroupName | text | field from the properties object |
sid | text | field from the properties object |
ssh_authorized_keys | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
type | text | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
user_id | text | field from the properties object |
username | text | field from the properties object |
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 |
properties | object | The Storage Account Local User properties. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, resourceGroupName, subscriptionId, username | Get the local user of the storage account by username. |
list | SELECT | accountName, resourceGroupName, subscriptionId | List the local users associated with the storage account. |
create_or_update | INSERT | accountName, resourceGroupName, subscriptionId, username | Create 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. |
delete | DELETE | accountName, resourceGroupName, subscriptionId, username | Deletes the local user associated with the specified storage account. |
regenerate_password | EXEC | accountName, resourceGroupName, subscriptionId, username | Regenerate the local user SSH password. |
SELECT
examples
List the local users associated with the storage account.
- vw_local_users
- local_users
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 }}';
SELECT
id,
name,
properties,
systemData,
type
FROM azure.storage.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.storage.local_users (
accountName,
resourceGroupName,
subscriptionId,
username,
properties,
systemData
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ username }}',
'{{ properties }}',
'{{ systemData }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: permissionScopes
value:
- - name: permissions
value: string
- name: service
value: string
- name: resourceName
value: string
- name: homeDirectory
value: string
- name: sshAuthorizedKeys
value: []
- name: sid
value: string
- name: hasSharedKey
value: boolean
- name: hasSshKey
value: boolean
- name: hasSshPassword
value: boolean
- name: userId
value: integer
- name: groupId
value: integer
- name: allowAclAuthorization
value: boolean
- name: extendedGroups
value:
- integer
- name: isNFSv3Enabled
value: boolean
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
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 }}';