你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

QueueOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

StorageManagementClient's

queue attribute.

Inheritance
builtins.object
QueueOperations

Constructor

QueueOperations(*args, **kwargs)

Methods

create

Creates a new queue with the specified queue name, under the specified account.

delete

Deletes the queue with the specified queue name, under the specified account if it exists.

get

Gets the queue with the specified queue name, under the specified account if it exists.

list

Gets a list of all the queues under the specified storage account.

update

Creates a new queue with the specified queue name, under the specified account.

create

Creates a new queue with the specified queue name, under the specified account.

async create(resource_group_name: str, account_name: str, queue_name: str, queue: _models.StorageQueue, *, content_type: str = 'application/json', **kwargs: Any) -> _models.StorageQueue

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.

queue_name
Required
str

A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters. Required.

queue
Required

Queue properties and metadata to be created with. Is either a StorageQueue type or a IO[bytes] type. Required.

Returns

Type Description

StorageQueue or the result of cls(response)

Exceptions

Type Description

delete

Deletes the queue with the specified queue name, under the specified account if it exists.

async delete(resource_group_name: str, account_name: str, queue_name: 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.

queue_name
Required
str

A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets the queue with the specified queue name, under the specified account if it exists.

async get(resource_group_name: str, account_name: str, queue_name: str, **kwargs: Any) -> StorageQueue

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.

queue_name
Required
str

A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters. Required.

Returns

Type Description

StorageQueue or the result of cls(response)

Exceptions

Type Description

list

Gets a list of all the queues under the specified storage account.

list(resource_group_name: str, account_name: str, maxpagesize: str | None = None, filter: str | None = None, **kwargs: Any) -> AsyncIterable[ListQueue]

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.

maxpagesize
Required
str

Optional, a maximum number of queues that should be included in a list queue response. Default value is None.

filter
Required
str

Optional, When specified, only the queues with a name starting with the given filter will be listed. Default value is None.

Returns

Type Description

An iterator like instance of either ListQueue or the result of cls(response)

Exceptions

Type Description

update

Creates a new queue with the specified queue name, under the specified account.

async update(resource_group_name: str, account_name: str, queue_name: str, queue: _models.StorageQueue, *, content_type: str = 'application/json', **kwargs: Any) -> _models.StorageQueue

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.

queue_name
Required
str

A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters. Required.

queue
Required

Queue properties and metadata to be created with. Is either a StorageQueue type or a IO[bytes] type. Required.

Returns

Type Description

StorageQueue 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'>