You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on review comments, the following changes have been made:
- Updated change logs to mention unreleased
- Removed all functions list from the README.md
- Renaming examples to samples to match pattern in other languages
- Removed singular helper functions and exists helper functions
- Adjusting code based on update to the dependencies
- Changed StorageServiceProperties to QueueServiceProperties
- Exposing clients and client options from the crate root
- Update test names to reflect operation
In order to interact with the Azure Queue service, you'll need to create an instance of a client, `QueueClient`. The [Azure Identity] library makes it easy to add Microsoft Entra ID support for authenticating Azure SDK clients with their corresponding Azure services:
You may need to specify RBAC roles to access Queues via Microsoft Entra ID. Please see [Assign an Azure role for access to queue data] for more details.
62
62
63
-
## Features
64
-
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 |
|`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 |
|`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 |
|`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 |
|`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 |
|`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 |
122
-
123
63
## Examples
124
64
125
-
<!-- TODO: Update the link below when the PR is merged -->
126
-
Executable examples of all the functions provided by this SDK can be found in the [queue_client.rs]<!--(https://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/storage/azure_storage_queue/examples/queue_client.rs)--> file in the examples directory.
65
+
<!-- TODO: Uncomment the links below when the PR is merged -->
66
+
You can find executable examples for all major SDK functions in:
@@ -139,7 +81,7 @@ When you submit a pull request, a CLA-bot will automatically determine whether y
139
81
140
82
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
141
83
142
-
<!-- TODO: Update the links below when the crate is published-->
84
+
<!-- TODO: Uncomment the links below when the PR is merged-->
0 commit comments