local_users
Creates, updates, deletes, gets or lists a local_users
resource.
Overview
Name | local_users |
Type | Resource |
Id | azure.storage.local_users |
Fields
The following fields are returned by SELECT
queries:
- get
- list
OK -- Get the local user properties successfully.
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
properties | object | Storage account local user properties. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
OK -- List local users successfully.
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
properties | object | Storage account local user properties. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , accountName , subscriptionId , username | Get the local user of the storage account by username. | |
list | select | resourceGroupName , accountName , subscriptionId | $maxpagesize , $filter , $include | List the local users associated with the storage account. |
create_or_update | insert | resourceGroupName , accountName , 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 | resourceGroupName , accountName , subscriptionId , username | Deletes the local user associated with the specified storage account. | |
regenerate_password | exec | resourceGroupName , accountName , subscriptionId , username | Regenerate the local user SSH password. |
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.
Name | Datatype | Description |
---|---|---|
accountName | string | The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. |
resourceGroupName | string | The name of the resource group within the user's subscription. The name is case insensitive. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
username | string | The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. |
$filter | string | Optional. When specified, only local user names starting with the filter will be listed. |
$include | string | Optional, when specified, will list local users enabled for the specific protocol. Lists all users by default. |
$maxpagesize | integer (int32) | Optional, specifies the maximum number of local users that will be included in the list response. |
SELECT
examples
- get
- list
Get the local user of the storage account by username.
SELECT
id,
name,
properties,
systemData,
type
FROM azure.storage.local_users
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND username = '{{ username }}' -- required
;
List the local users associated with the storage account.
SELECT
id,
name,
properties,
systemData,
type
FROM azure.storage.local_users
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $maxpagesize = '{{ $maxpagesize }}'
AND $filter = '{{ $filter }}'
AND $include = '{{ $include }}'
;
INSERT
examples
- create_or_update
- Manifest
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.
INSERT INTO azure.storage.local_users (
data__properties,
resourceGroupName,
accountName,
subscriptionId,
username
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ subscriptionId }}',
'{{ username }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: local_users
props:
- name: resourceGroupName
value: string
description: Required parameter for the local_users resource.
- name: accountName
value: string
description: Required parameter for the local_users resource.
- name: subscriptionId
value: string (uuid)
description: Required parameter for the local_users resource.
- name: username
value: string
description: Required parameter for the local_users resource.
- name: properties
value: object
description: |
Storage account local user properties.
DELETE
examples
- delete
Deletes the local user associated with the specified storage account.
DELETE FROM azure.storage.local_users
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND username = '{{ username }}' --required
;
Lifecycle Methods
- regenerate_password
Regenerate the local user SSH password.
EXEC azure.storage.local_users.regenerate_password
@resourceGroupName='{{ resourceGroupName }}' --required,
@accountName='{{ accountName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@username='{{ username }}' --required
;