diff --git a/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md b/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md index 9b1e0f0922fb..767d710b3c67 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md +++ b/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.1.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 1.0.1 (2025-05-15) ### Bugs Fixed -### Other Changes +- Fixed the `Name` of `QueueService` should always be `default`. (https://github.com/Azure/azure-sdk-for-net/issues/49898) ## 1.0.0 (2024-10-25) diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj b/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj index 6850b3001da1..34800fb65f37 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj @@ -2,7 +2,7 @@ Azure.Provisioning.Storage simplifies declarative resource provisioning in .NET for Azure Storage. - 1.1.0-beta.1 + 1.0.1 1.0.0 $(RequiredTargetFrameworks) diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs index 968f8e6d5687..12ebe6cbadb8 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs @@ -18,13 +18,6 @@ namespace Azure.Provisioning.Storage; /// public partial class QueueService : ProvisionableResource { - /// - /// Gets the Name. - /// - public BicepValue Name - { - get { Initialize(); return _name!; } - } private BicepValue? _name; /// @@ -66,6 +59,11 @@ public StorageAccount? Parent } private ResourceReference? _parent; + /// + /// Get the default value for the Name property. + /// + private partial BicepValue GetNameDefaultValue(); + /// /// Creates a new QueueService. /// @@ -86,7 +84,7 @@ public QueueService(string bicepIdentifier, string? resourceVersion = default) /// protected override void DefineProvisionableProperties() { - _name = DefineProperty("Name", ["name"], isOutput: true); + _name = DefineProperty("Name", ["name"], defaultValue: GetNameDefaultValue()); _corsRules = DefineListProperty("CorsRules", ["properties", "cors", "corsRules"]); _id = DefineProperty("Id", ["id"], isOutput: true); _systemData = DefineModelProperty("SystemData", ["systemData"], isOutput: true); diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/QueueService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/QueueService.cs new file mode 100644 index 000000000000..7faf1c4e9dcc --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/QueueService.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Provisioning.Expressions; + +namespace Azure.Provisioning.Storage; + +// Customize the generated FileService resource. +public partial class QueueService +{ + /// + /// Get the default value for the Name property. + /// + private partial BicepValue GetNameDefaultValue() => + new StringLiteralExpression("default"); + + /// + /// Gets the Name. + /// + public BicepValue Name + { + get { Initialize(); return _name!; } + } +} diff --git a/sdk/provisioning/Generator/src/Specifications/StorageSpecification.cs b/sdk/provisioning/Generator/src/Specifications/StorageSpecification.cs index 917bdc01eb23..0715bfd43f59 100644 --- a/sdk/provisioning/Generator/src/Specifications/StorageSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/StorageSpecification.cs @@ -34,6 +34,7 @@ protected override void Customize() CustomizeProperty("Name", p => { p.GenerateDefaultValue = true; p.HideAccessors = true; p.IsReadOnly = false; }); // must be `default` AddNameRequirements(min: 3, max: 63, lower: true, digits: true, hyphen: true); AddNameRequirements(min: 3, max: 63, lower: true, upper: true, digits: true); + CustomizeProperty("Name", p => { p.GenerateDefaultValue = true; p.HideAccessors = true; p.IsReadOnly = false; }); // must be `default` // Roles Roles.Add(new Role("StorageAccountBackupContributor", "e5e2a7ff-d759-4cd2-bb51-3152d37e2eb1", "Lets you perform backup and restore operations using Azure Backup on the storage account."));