Skip to content

Commit 1833dda

Browse files
committed
Clients now reflect more in line to csharp. Adding a separate assets.json for the queue crate. Removing access policy api as there is issue with (de)serialization and this is also not yet implemented in blob.
1 parent 58e3d8f commit 1833dda

File tree

14 files changed

+445
-488
lines changed

14 files changed

+445
-488
lines changed

sdk/storage/assets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "rust",
4-
"Tag": "rust/azure_storage_5ed46ef9da",
5-
"TagPrefix": "rust/azure_storage"
6-
}
4+
"Tag": "rust/azure_storage_blob_a55c38eec2",
5+
"TagPrefix": "rust/azure_storage_blob"
6+
}

sdk/storage/azure_storage_queue/README.md

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,63 @@ You may need to specify RBAC roles to access Queues via Microsoft Entra ID. Plea
6262

6363
## Features
6464

65-
The following methods are available on the ```QueueClient``` class:
66-
67-
- ```new```: Create a new instance of the ```QueueClient```.
68-
- ```create```: Creates a new queue, will fail if the queue already exists.
69-
- ```create_if_not_exists```: Creates a new queue, will _not_ fail if the queue already exists.
70-
- ```delete```: Deletes a queue, will fail if the queue does not exist.
71-
- ```delete_if_exists```: Deletes a queue, will _not_ fail if the queue does not exist.
72-
- ```delete_message```: Deletes a single message from the queue.
73-
- ```delete_messages```: Deletes all the messages in a queue. Requires Account Owner permission or it will fail.
74-
- ```exists```: Returns bool representing whether the queue exists or not.
75-
- ```get_metadata```: Returns metadata for the queue.
76-
- ```get_properties```: Returns the properties of the queue service.
77-
- ```peek_message```: Peeks a single message from the front of the queue without removing it.
78-
- ```peek_messages```: Peeks multiple messages from the front of the queue without removing them.
79-
- ```receive_message```: Receive a single message from the queue.
80-
- ```receive_messages```: Receive multiple messages from the queue. The number of messages to return is determined by the ```AzureQueueStorageMessagesOperationsClientDequeueOptions::number_of_messages``` property.
81-
- ```send_message```: Sends a message to the queue.
82-
- ```set_metadata```: Sets metadata on the queue.
83-
- ```update_message```: Updates a specific message in the queue.
65+
### QueueServiceClient
66+
67+
The `QueueServiceClient` provides operations to interact with the Azure Storage Queue service at the account level.
68+
69+
| Method | Parameters | Return Type | Description |
70+
|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
71+
| `new` | `endpoint: &str`<br>`credential: Arc<dyn TokenCredential>`<br>`options: Option<QueueServiceClientOptions>` | `Result<Self>` | Creates a new QueueServiceClient using Entra ID authentication |
72+
| `endpoint` | `&self` | `&Url` | Returns the endpoint URL of the Azure storage account |
73+
| `queue_client` | `&self`<br>`queue_name: String` | `QueueClient` | Returns a new QueueClient instance for a specific queue |
74+
| `create_queue` | `&self`<br>`queue_name: &str`<br>`options: Option<QueueClientCreateOptions<'_>>` | `Result<Response<(), NoFormat>>` | Creates a new queue under the account |
75+
| `delete_queue` | `&self`<br>`queue_name: &str`<br>`options: Option<QueueClientDeleteOptions<'_>>` | `Result<Response<(), NoFormat>>` | Permanently deletes the specified queue |
76+
| `get_properties` | `&self`<br>`options: Option<QueueServiceClientGetPropertiesOptions<'_>>` | `Result<Response<StorageServiceProperties, XmlFormat>>` | Retrieves the properties of the queue service |
77+
| `set_properties` | `&self`<br>`storage_service_properties: RequestContent<StorageServiceProperties>`<br>`options: Option<QueueServiceClientSetPropertiesOptions<'_>>` | `Result<Response<(), NoFormat>>` | Sets the properties of the queue service |
78+
| `list_queues` | `&self`<br>`options: Option<QueueServiceClientListQueuesOptions<'_>>` | `Result<PageIterator<Response<ListQueuesResponse, XmlFormat>>>` | Lists queues in the storage account with pagination |
79+
| `get_statistics` | `&self`<br>`options: Option<QueueServiceClientGetStatisticsOptions<'_>>` | `Result<Response<StorageServiceStats, XmlFormat>>` | Retrieves statistics related to replication for the Queue service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account |
80+
81+
---
82+
83+
### QueueClient
84+
85+
The `QueueClient` provides operations to interact with a specific Azure Storage Queue.
86+
87+
| Method | Parameters | Return Type | Description |
88+
|--------------|---------------------------------------------------------------------------------------------------------------------------|----------------|--------------------------------------------------------------|
89+
| `new` | `endpoint: &str`<br>`queue_name: &str`<br>`credential: Arc<dyn TokenCredential>`<br>`options: Option<QueueClientOptions>` | `Result<Self>` | Creates a new QueueClient using Entra ID authentication |
90+
| `endpoint` | `&self` | `&Url` | Returns the endpoint URL of the Azure storage account |
91+
| `queue_name` | `&self` | `&str` | Returns the name of the queue this client is associated with |
92+
93+
#### Queue Management
94+
95+
| Method | Parameters | Return Type | Description |
96+
|------------------------|------------------------------------------------------------|----------------------------------|---------------------------------------------|
97+
| `create` | `&self`<br>`options: Option<QueueClientCreateOptions<'_>>` | `Result<Response<(), NoFormat>>` | Creates a new queue |
98+
| `create_if_not_exists` | `&self`<br>`options: Option<QueueClientCreateOptions<'_>>` | `Result<Response<(), NoFormat>>` | Creates a queue if it doesn't already exist |
99+
| `delete` | `&self`<br>`options: Option<QueueClientDeleteOptions<'_>>` | `Result<Response<(), NoFormat>>` | Permanently deletes the queue |
100+
| `delete_if_exists` | `&self`<br>`options: Option<QueueClientDeleteOptions<'_>>` | `Result<Response<(), NoFormat>>` | Deletes the queue if it exists |
101+
| `exists` | `&self` | `Result<bool>` | Checks if the queue exists |
102+
| `clear` | `&self`<br>`options: Option<QueueClientClearOptions<'_>>` | `Result<Response<(), NoFormat>>` | Clears all messages in the queue |
103+
104+
#### Metadata Operations
105+
106+
| Method | Parameters | Return Type | Description |
107+
|----------------|-----------------------------------------------------------------|------------------------------------------------------------|-------------------------------------|
108+
| `set_metadata` | `&self`<br>`options: Option<QueueClientSetMetadataOptions<'_>>` | `Result<Response<(), NoFormat>>` | Sets the metadata for the queue |
109+
| `get_metadata` | `&self`<br>`options: Option<QueueClientGetMetadataOptions<'_>>` | `Result<Response<QueueClientGetMetadataResult, NoFormat>>` | Retrieves the metadata of the queue |
110+
111+
#### Message Operations
112+
113+
| Method | Parameters | Return Type | Description |
114+
|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|---------------------------------------------------------|
115+
| `send_message` | `&self`<br>`queue_message: RequestContent<QueueMessage>`<br>`options: Option<QueueClientSendMessageOptions<'_>>` | `Result<Response<Option<SentMessage>, XmlFormat>>` | Sends a message to the queue |
116+
| `receive_message` | `&self`<br>`options: Option<QueueClientReceiveMessagesOptions<'_>>` | `Result<Response<Option<ReceivedMessage>, XmlFormat>>` | Retrieves a single message from the front of the queue |
117+
| `receive_messages` | `&self`<br>`options: Option<QueueClientReceiveMessagesOptions<'_>>` | `Result<Response<ListOfReceivedMessage, XmlFormat>>` | Retrieves multiple messages from the front of the queue |
118+
| `peek_message` | `&self`<br>`options: Option<QueueClientPeekMessagesOptions<'_>>` | `Result<Response<Option<PeekedMessage>, XmlFormat>>` | Peeks a single message without removing it |
119+
| `peek_messages` | `&self`<br>`options: Option<QueueClientPeekMessagesOptions<'_>>` | `Result<Response<ListOfPeekedMessage, XmlFormat>>` | Peeks multiple messages without removing them |
120+
| `delete_message` | `&self`<br>`message_id: &str`<br>`pop_receipt: &str`<br>`options: Option<QueueClientDeleteMessageOptions<'_>>` | `Result<Response<(), NoFormat>>` | Deletes a specific message from the queue |
121+
| `update_message` | `&self`<br>`message_id: &str`<br>`pop_receipt: &str`<br>`visibility_timeout: i32`<br>`options: Option<QueueClientUpdateOptions<'_>>` | `Result<Response<(), NoFormat>>` | Updates a specific message in the queue |
84122

85123
## Examples
86124

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"AssetsRepo": "Azure/azure-sdk-assets",
3+
"AssetsRepoPrefixPath": "rust",
4+
"Tag": "rust/azure_storage_queue_d6e20c5b11",
5+
"TagPrefix": "rust/azure_storage_queue"
6+
}

0 commit comments

Comments
 (0)