Skip to content

Commit 5264b64

Browse files
kzhenArcturusZhang
andauthored
Assign default name to QueueService (#49672)
* Assign default name to QueueService Updated QueueService to use `default` for the name property value as per the spec https://learn.microsoft.com/en-us/azure/templates/microsoft.storage/storageaccounts/queueservices?pivots=deployment-language-bicep * Updated API for Azure.Provisioning.Storage (via Export-API.ps1) * add back the missing api * add changelog * update version to 1.0.1 --------- Co-authored-by: Arcturus Zhang <[email protected]>
1 parent bc16edb commit 5264b64

File tree

5 files changed

+34
-15
lines changed

5 files changed

+34
-15
lines changed

sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Release History
22

3-
## 1.1.0-beta.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
3+
## 1.0.1 (2025-05-15)
84

95
### Bugs Fixed
106

11-
### Other Changes
7+
- Fixed the `Name` of `QueueService` should always be `default`. (https://github.com/Azure/azure-sdk-for-net/issues/49898)
128

139
## 1.0.0 (2024-10-25)
1410

sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<Description>Azure.Provisioning.Storage simplifies declarative resource provisioning in .NET for Azure Storage.</Description>
5-
<Version>1.1.0-beta.1</Version>
5+
<Version>1.0.1</Version>
66
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
77
<ApiCompatVersion>1.0.0</ApiCompatVersion>
88
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>

sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs

Lines changed: 6 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using Azure.Provisioning.Expressions;
5+
6+
namespace Azure.Provisioning.Storage;
7+
8+
// Customize the generated FileService resource.
9+
public partial class QueueService
10+
{
11+
/// <summary>
12+
/// Get the default value for the Name property.
13+
/// </summary>
14+
private partial BicepValue<string> GetNameDefaultValue() =>
15+
new StringLiteralExpression("default");
16+
17+
/// <summary>
18+
/// Gets the Name.
19+
/// </summary>
20+
public BicepValue<string> Name
21+
{
22+
get { Initialize(); return _name!; }
23+
}
24+
}

sdk/provisioning/Generator/src/Specifications/StorageSpecification.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ protected override void Customize()
3434
CustomizeProperty<StorageAccountManagementPolicyResource>("Name", p => { p.GenerateDefaultValue = true; p.HideAccessors = true; p.IsReadOnly = false; }); // must be `default`
3535
AddNameRequirements<StorageQueueResource>(min: 3, max: 63, lower: true, digits: true, hyphen: true);
3636
AddNameRequirements<TableResource>(min: 3, max: 63, lower: true, upper: true, digits: true);
37+
CustomizeProperty<QueueServiceResource>("Name", p => { p.GenerateDefaultValue = true; p.HideAccessors = true; p.IsReadOnly = false; }); // must be `default`
3738

3839
// Roles
3940
Roles.Add(new Role("StorageAccountBackupContributor", "e5e2a7ff-d759-4cd2-bb51-3152d37e2eb1", "Lets you perform backup and restore operations using Azure Backup on the storage account."));

0 commit comments

Comments
 (0)