你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
LocalUsersOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:local_users> attribute.
- Inheritance
-
builtins.objectLocalUsersOperations
Constructor
LocalUsersOperations(*args, **kwargs)
Methods
create_or_update |
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 |
Deletes the local user associated with the specified storage account. |
get |
Get the local user of the storage account by username. |
list |
List the local users associated with the storage account. |
list_keys |
List SSH authorized keys and shared key of the local user. |
regenerate_password |
Regenerate the local user SSH password. |
create_or_update
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.
async create_or_update(resource_group_name: str, account_name: str, username: str, properties: _models.LocalUser, *, content_type: str = 'application/json', **kwargs: Any) -> _models.LocalUser
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
Required
|
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. Required. |
username
Required
|
The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. Required. |
properties
Required
|
The local user associated with a storage account. Is either a LocalUser type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
LocalUser or the result of cls(response) |
Exceptions
Type | Description |
---|---|
delete
Deletes the local user associated with the specified storage account.
async delete(resource_group_name: str, account_name: str, username: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
Required
|
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. Required. |
username
Required
|
The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. Required. |
Returns
Type | Description |
---|---|
None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Get the local user of the storage account by username.
async get(resource_group_name: str, account_name: str, username: str, **kwargs: Any) -> LocalUser
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
Required
|
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. Required. |
username
Required
|
The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. Required. |
Returns
Type | Description |
---|---|
LocalUser or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
List the local users associated with the storage account.
list(resource_group_name: str, account_name: str, maxpagesize: int | None = None, filter: str | None = None, include: str | ListLocalUserIncludeParam | None = None, **kwargs: Any) -> AsyncIterable[LocalUser]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
Required
|
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. Required. |
maxpagesize
Required
|
Optional, specifies the maximum number of local users that will be included in the list response. Default value is None. |
filter
Required
|
Optional. When specified, only local user names starting with the filter will be listed. Default value is None. |
include
Required
|
Optional, when specified, will list local users enabled for the specific protocol. Lists all users by default. "nfsv3" Default value is None. |
Returns
Type | Description |
---|---|
An iterator like instance of either LocalUser or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_keys
List SSH authorized keys and shared key of the local user.
async list_keys(resource_group_name: str, account_name: str, username: str, **kwargs: Any) -> LocalUserKeys
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
Required
|
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. Required. |
username
Required
|
The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. Required. |
Returns
Type | Description |
---|---|
LocalUserKeys or the result of cls(response) |
Exceptions
Type | Description |
---|---|
regenerate_password
Regenerate the local user SSH password.
async regenerate_password(resource_group_name: str, account_name: str, username: str, **kwargs: Any) -> LocalUserRegeneratePasswordResult
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
Required
|
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. Required. |
username
Required
|
The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. Required. |
Returns
Type | Description |
---|---|
LocalUserRegeneratePasswordResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.storage.v2023_05_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\storage\\v2023_05_01\\models\\__init__.py'>