LocalUser
Provides a LocalUser from the Storage group
Examples
CreateLocalUser
exports.createResources = () => [
{
type: "LocalUser",
group: "Storage",
name: "myLocalUser",
properties: () => ({
properties: {
permissionScopes: [
{ permissions: "rwd", service: "file", resourceName: "share1" },
{ permissions: "rw", service: "file", resourceName: "share2" },
],
homeDirectory: "homedirectory",
hasSshPassword: true,
sshAuthorizedKeys: [
{ description: "key name", key: "ssh-rsa keykeykeykeykey=" },
],
},
}),
dependencies: ({}) => ({
resourceGroup: "myResourceGroup",
account: "myStorageAccount",
}),
},
];
UpdateLocalUser
exports.createResources = () => [
{
type: "LocalUser",
group: "Storage",
name: "myLocalUser",
properties: () => ({
properties: {
homeDirectory: "homedirectory2",
hasSharedKey: false,
hasSshPassword: false,
hasSshKey: false,
},
}),
dependencies: ({}) => ({
resourceGroup: "myResourceGroup",
account: "myStorageAccount",
}),
},
];
Dependencies
Swagger Schema
{
type: 'object',
properties: {
properties: {
'x-ms-client-flatten': true,
description: 'Storage account local user properties.',
type: 'object',
properties: {
permissionScopes: {
type: 'array',
items: {
type: 'object',
properties: {
permissions: {
type: 'string',
description: 'The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c).'
},
service: {
type: 'string',
description: 'The service used by the local user, e.g. blob, file.'
},
resourceName: {
type: 'string',
description: 'The name of resource, normally the container name or the file share name, used by the local user.'
}
},
required: [ 'permissions', 'service', 'resourceName' ]
},
description: 'The permission scopes of the local user.'
},
homeDirectory: {
type: 'string',
description: 'Optional, local user home directory.'
},
sshAuthorizedKeys: {
type: 'array',
items: {
type: 'object',
properties: {
description: {
type: 'string',
description: 'Optional. It is used to store the function/usage of the key'
},
key: {
type: 'string',
description: "Ssh public key base64 encoded. The format should be: '<keyType> <keyData>', e.g. ssh-rsa AAAABBBB"
}
}
},
description: 'Optional, local user ssh authorized keys for SFTP.'
},
sid: {
readOnly: true,
type: 'string',
description: 'A unique Security Identifier that is generated by the server.'
},
hasSharedKey: {
type: 'boolean',
description: 'Indicates whether shared key exists. Set it to false to remove existing shared key.'
},
hasSshKey: {
type: 'boolean',
description: 'Indicates whether ssh key exists. Set it to false to remove existing SSH key.'
},
hasSshPassword: {
type: 'boolean',
description: 'Indicates whether ssh password exists. Set it to false to remove existing SSH password.'
}
}
},
systemData: {
description: 'Metadata pertaining to creation and last modification of the resource.',
type: 'object',
readOnly: true,
properties: {
createdBy: {
type: 'string',
description: 'The identity that created the resource.'
},
createdByType: {
type: 'string',
description: 'The type of identity that created the resource.',
enum: [ 'User', 'Application', 'ManagedIdentity', 'Key' ],
'x-ms-enum': { name: 'createdByType', modelAsString: true }
},
createdAt: {
type: 'string',
format: 'date-time',
description: 'The timestamp of resource creation (UTC).'
},
lastModifiedBy: {
type: 'string',
description: 'The identity that last modified the resource.'
},
lastModifiedByType: {
type: 'string',
description: 'The type of identity that last modified the resource.',
enum: [ 'User', 'Application', 'ManagedIdentity', 'Key' ],
'x-ms-enum': { name: 'createdByType', modelAsString: true }
},
lastModifiedAt: {
type: 'string',
format: 'date-time',
description: 'The timestamp of resource last modification (UTC)'
}
}
}
},
allOf: [
{
title: 'Resource',
description: 'Common fields that are returned in the response for all Azure Resource Manager resources',
type: 'object',
properties: {
id: {
readOnly: true,
type: 'string',
description: 'Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
},
name: {
readOnly: true,
type: 'string',
description: 'The name of the resource'
},
type: {
readOnly: true,
type: 'string',
description: 'The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"'
}
},
'x-ms-azure-resource': true
}
],
description: 'The local user associated with the storage accounts.'
}
Misc
The resource version is 2022-05-01
.
The Swagger schema used to generate this documentation can be found here.