Skip to content

Commit af15a44

Browse files
shanefujsShane Fu
andauthored
Storage Discovery General Availability Release (#28571)
Co-authored-by: Shane Fu <[email protected]>
1 parent 8606cf4 commit af15a44

27 files changed

+404
-54
lines changed

src/StorageDiscovery/StorageDiscovery.Autorest/UX/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "storageDiscoveryWorkspaces",
3-
"apiVersion": "2025-06-01-preview",
3+
"apiVersion": "2025-09-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.storagediscovery"
66
},

src/StorageDiscovery/StorageDiscovery.Autorest/custom/Az.StorageDiscovery.custom.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# region Generated
22
# Load the private module dll
3-
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.StorageDiscovery.private.dll')
3+
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.StorageDiscovery.private.dll')
44

55
# Load the internal module
6-
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.StorageDiscovery.internal.psm1'
6+
$internalModulePath = Join-Path $PSScriptRoot '../internal/Az.StorageDiscovery.internal.psm1'
77
if(Test-Path $internalModulePath) {
88
$null = Import-Module -Name $internalModulePath
99
}

src/StorageDiscovery/StorageDiscovery.Autorest/custom/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Custom
2-
This directory contains custom implementation for non-generated cmdlets for the `Az.StorageDiscovery` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.StorageDiscovery.custom.psm1`. This file should not be modified.
2+
This directory contains custom implementation for non-generated cmdlets for the `Az.StorageDiscovery` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `../exports` folder. The only generated file into this folder is the `Az.StorageDiscovery.custom.psm1`. This file should not be modified.
33

44
## Info
55
- Modifiable: yes
@@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle
1515
For script cmdlets, these are loaded via the `Az.StorageDiscovery.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
1616

1717
## Purpose
18-
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
18+
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder.
1919

2020
## Usage
21-
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
21+
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `../exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
2222
- Break
2323
- DefaultProfile
2424
- HttpPipelineAppend
@@ -36,6 +36,6 @@ For processing the cmdlets, we've created some additional attributes:
3636
- `Microsoft.Azure.PowerShell.Cmdlets.StorageDiscovery.DoNotExportAttribute`
3737
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.StorageDiscovery`.
3838
- `Microsoft.Azure.PowerShell.Cmdlets.StorageDiscovery.InternalExportAttribute`
39-
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.StorageDiscovery`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
39+
- Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.StorageDiscovery`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
4040
- `Microsoft.Azure.PowerShell.Cmdlets.StorageDiscovery.ProfileAttribute`
4141
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.

src/StorageDiscovery/StorageDiscovery.Autorest/custom/autogen-model-cmdlets/New-AzStorageDiscoveryScopeObject.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function New-AzStorageDiscoveryScopeObject {
3939
[string[]]
4040
$ResourceType,
4141
[Parameter(HelpMessage="Resource tags.")]
42-
[Microsoft.Azure.PowerShell.Cmdlets.StorageDiscovery.Models.ITags]
42+
[Microsoft.Azure.PowerShell.Cmdlets.StorageDiscovery.Models.IStorageDiscoveryScopeTags]
4343
$Tag,
4444
[Parameter(HelpMessage="The storage account tags keys to filter.")]
4545
[string[]]

src/StorageDiscovery/StorageDiscovery.Autorest/docs/Az.StorageDiscovery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.StorageDiscovery
3-
Module Guid: d88ebaf3-95a8-4142-a582-f2526d777a7c
3+
Module Guid: e862cfcb-5844-4c82-afae-b23fdfd67bdd
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.storagediscovery
55
Help Version: 1.0.0.0
66
Locale: en-US

src/StorageDiscovery/StorageDiscovery.Autorest/docs/New-AzStorageDiscoveryScopeObject.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Create an in-memory object for StorageDiscoveryScope.
1313
## SYNTAX
1414

1515
```
16-
New-AzStorageDiscoveryScopeObject -DisplayName <String> -ResourceType <String[]> [-Tag <ITags>]
17-
[-TagKeysOnly <String[]>] [<CommonParameters>]
16+
New-AzStorageDiscoveryScopeObject -DisplayName <String> -ResourceType <String[]>
17+
[-Tag <IStorageDiscoveryScopeTags>] [-TagKeysOnly <String[]>] [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION
@@ -95,7 +95,7 @@ Accept wildcard characters: False
9595
Resource tags.
9696
9797
```yaml
98-
Type: Microsoft.Azure.PowerShell.Cmdlets.StorageDiscovery.Models.ITags
98+
Type: Microsoft.Azure.PowerShell.Cmdlets.StorageDiscovery.Models.IStorageDiscoveryScopeTags
9999
Parameter Sets: (All)
100100
Aliases:
101101

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Docs
2-
This directory contains the documentation of the cmdlets for the `Az.StorageDiscovery` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder.
2+
This directory contains the documentation of the cmdlets for the `Az.StorageDiscovery` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `../examples` folder.
33

44
## Info
55
- Modifiable: no
@@ -8,4 +8,4 @@ This directory contains the documentation of the cmdlets for the `Az.StorageDisc
88
- Packaged: yes
99

1010
## Details
11-
The process of documentation generation loads `Az.StorageDiscovery` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder.
11+
The process of documentation generation loads `Az.StorageDiscovery` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `../exports` folder. Additionally, when writing custom cmdlets in the `../custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `../examples` folder.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"generate_Id": "60c9a46f-76b7-4bd5-8af2-72f8ed0c8de7"
2+
"generate_Id": "78baa472-4432-4cbd-bb45-39983c7e1ac6"
33
}

src/StorageDiscovery/StorageDiscovery.Autorest/resources/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Resources
2-
This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder.
2+
This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `../custom` folder.
33

44
## Info
55
- Modifiable: yes

0 commit comments

Comments
 (0)