LocalUsersOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

StorageManagementClient's

<xref:local_users> attribute.

Inheritance
builtins.object
LocalUsersOperations

Constructor

LocalUsersOperations(*args, **kwargs)

Methods

create_or_update

Create or update the properties of a local user associated with the storage account.

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.

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
str

The name of the resource group within the user's subscription. The name is case insensitive. Required.

account_name
Required
str

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
str

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.

delete(resource_group_name: str, account_name: str, username: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. The name is case insensitive. Required.

account_name
Required
str

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
str

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.

get(resource_group_name: str, account_name: str, username: str, **kwargs: Any) -> LocalUser

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. The name is case insensitive. Required.

account_name
Required
str

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
str

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, **kwargs: Any) -> Iterable[LocalUser]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. The name is case insensitive. Required.

account_name
Required
str

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.

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.

list_keys(resource_group_name: str, account_name: str, username: str, **kwargs: Any) -> LocalUserKeys

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. The name is case insensitive. Required.

account_name
Required
str

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
str

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.

regenerate_password(resource_group_name: str, account_name: str, username: str, **kwargs: Any) -> LocalUserRegeneratePasswordResult

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. The name is case insensitive. Required.

account_name
Required
str

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
str

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.v2022_05_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\storage\\v2022_05_01\\models\\__init__.py'>