Skip to content

Commit 0975654

Browse files
committed
Resolve review feedback, add document for installing modules, other minor changes
1 parent b484613 commit 0975654

File tree

12 files changed

+132
-163
lines changed

12 files changed

+132
-163
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ _This project has adopted the [Microsoft Open Source Code of Conduct][CodeOfCond
162162

163163
[Contributing]: CONTRIBUTING.md
164164

165-
[AzureIcon]: documentation/MicrosoftAzure-32px.png
166-
[PowershellIcon]: documentation/MicrosoftPowerShellCore-32px.png
165+
[AzureIcon]: documentation/images/MicrosoftAzure-32px.png
166+
[PowershellIcon]: documentation/images/MicrosoftPowerShellCore-32px.png
167167
[AzurePowerShelModules]: documentation/azure-powershell-modules.md
168168
[DeveloperGuide]: documentation/development-docs/azure-powershell-developer-guide.md
169169

@@ -186,12 +186,12 @@ _This project has adopted the [Microsoft Open Source Code of Conduct][CodeOfCond
186186
[MicrosoftAzureDocs]: https://docs.microsoft.com/en-us/azure/
187187
[PowerShellDocs]: https://docs.microsoft.com/en-us/powershell/
188188

189-
[InstallationGuide]: https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps
189+
[InstallationGuide]: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps
190190
[GettingStartedGuide]: https://docs.microsoft.com/en-us/powershell/azure/get-started-azureps
191191
[PersistedCredentialsGuide]: https://docs.microsoft.com/en-us/powershell/azure/context-persistence
192192

193-
[ConnectAzAccount]: https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/connect-azurermaccount
194-
[GetAzContext]: https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/get-azurermcontext
195-
[GetAzSubscription]: https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/get-azurermsubscription
196-
[SetAzContext]: https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/set-azurermcontext
197-
[SendFeedback]: https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/send-feedback
193+
[ConnectAzAccount]: https://docs.microsoft.com/en-us/powershell/module/az.accounts/connect-azaccount
194+
[GetAzContext]: https://docs.microsoft.com/en-us/powershell/module/az.accounts/get-azcontext
195+
[GetAzSubscription]: https://docs.microsoft.com/en-us/powershell/module/az.accounts/get-azsubscription
196+
[SetAzContext]: https://docs.microsoft.com/en-us/powershell/module/az.accounts/set-azcontext
197+
[SendFeedback]: https://docs.microsoft.com/en-us/powershell/module/az.accounts/send-feedback

documentation/development-docs/design-guidelines/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ In this folder, you will find best practices and design guidelines for different
2424
- [Piping Best Practices](./piping-best-practices.md)
2525
- [Piping in PowerShell](./piping-best-practices.md#piping-in-powershell)
2626
- [Understanding Piping](./piping-best-practices.md#understanding-piping)
27-
- [More Information](./piping-best-practices.md#more-information)
2827
- [Piping in Azure PowerShell](./piping-best-practices.md#piping-in-azure-powershell)
2928
- [Using the `-InputObject` Parameter](./piping-best-practices.md#using-the-inputobject-parameter)
3029
- [Using the `-ResourceId` Parameter](./piping-best-practices.md#using-the-resourceid-parameter)
31-
- [Summary](./piping-best-practices.md#summary)
30+
- [Full examples](./piping-best-practices.md#full-examples)
3231
- [`ShouldProcess` and `ConfirmImpact`](./should-process-confirm-impact.md)
3332
- [`ShouldProcess`](./should-process-confirm-impact.md#shouldprocess)
3433
- [`ConfirmImpact`](./should-process-confirm-impact.md#confirmimpact)

documentation/development-docs/design-guidelines/piping-best-practices.md

Lines changed: 42 additions & 153 deletions
Large diffs are not rendered by default.

documentation/development-docs/design-guidelines/should-process-confirm-impact.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public class RemoveFoo
2424
}
2525
```
2626

27+
Please see the example cmdlets found in our [`examples`](../examples) folder for additional implementations of `ShouldProcess`.
28+
2729
By default, `ShouldProcess` interacts with the cmdlet `ConfirmImpact` and the user's `$ConfirmPreference` setting to decide whether to prompt the user before continuing cmdlet processing. The `$ConfirmPreference` determines the level at which confirmation automatically occurs, and no prompt is shown. If the `ConfirmImpact` specified in a cmdlet is at or below the level of `$ConfirmPreference`, then processing occurs automatically without displaying a prompt. Since both `ConfirmImpact` and `$ConfirmPreference` are set by default to `Medium`, this means that, by default, no confirmation prompt is shown and the cmdlet executes normally.
2830

2931
PowerShell has several tools that allow users to explore and control what happens during execution of cmdlets, and this change in implementation allows them to use these tools.

documentation/development-docs/examples/get-cmdlet-example.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## `Get-*` cmdlet example
22

3+
_Note_: for the below examples, the string "TopLevelResource" would be replaced with the name of your top-level resource (_e.g._, "VirtualMachine", "VirtualNetwork", "SqlServer"), and the string "ChildResource" would be replaced with the name of your child resource (_e.g._, "VirtualMachineExtension", "VirtualNetworkPeering", "SqlDatabase")
4+
35
### Top-level resource
46

57
All top-level resources should have a `Get-*` cmdlet that allows users to list the resources in their subscription or a resource group, as well as get a specific resource. In addition, users should be able to provide the resource id of the resource they want to get, and the cmdlet will parse the string to get the necessary identity information.

documentation/development-docs/examples/new-cmdlet-example.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## `New-*` cmdlet example
22

3+
_Note_: for the below examples, the string "TopLevelResource" would be replaced with the name of your top-level resource (_e.g._, "VirtualMachine", "VirtualNetwork", "SqlServer"), and the string "ChildResource" would be replaced with the name of your child resource (_e.g._, "VirtualMachineExtension", "VirtualNetworkPeering", "SqlDatabase")
4+
35
### Top-level resource
46

57
All top-level resources should have a `New-*` cmdlet that allows users to create a resource with given properties. Properties that are required by the API should be mandatory parameters, and in the case where different combinations of properties are needed depending on a provided value (_e.g._, Windows and Linux VMs have different properties), multiple parameter sets should be used. This cmdlet should implement `SupportsShouldProcess` to allow users to provide the `-WhatIf` parameter and see what the result of executing the cmdlet is without the resource actually being created.

documentation/development-docs/examples/remove-cmdlet-example.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## `Remove-*` cmdlet example
22

3+
_Note_: for the below examples, the string "TopLevelResource" would be replaced with the name of your top-level resource (_e.g._, "VirtualMachine", "VirtualNetwork", "SqlServer"), and the string "ChildResource" would be replaced with the name of your child resource (_e.g._, "VirtualMachineExtension", "VirtualNetworkPeering", "SqlDatabase")
4+
35
### Top-level resource
46

57
All top-level resources should have a `Remove-*` cmdlet that allows users to delete a specific resource. The user can delete a resource by providing all identity properties, the resource id, or the object representation of the resource. This cmdlet should implement `SupportsShouldProcess` to allow users to provide the `-WhatIf` parameter and see what the result of executing the cmdlet is without the resource actually being deleted. This cmdlet should also implement the [`-PassThru`](../design-guidelines/cmdlet-best-practices.md#returning-no-output) parameter, which allows the user to receive output when no output would normally be provided.

documentation/development-docs/examples/set-cmdlet-example.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## `Set-*` cmdlet example
22

3+
_Note_: for the below examples, the string "TopLevelResource" would be replaced with the name of your top-level resource (_e.g._, "VirtualMachine", "VirtualNetwork", "SqlServer"), and the string "ChildResource" would be replaced with the name of your child resource (_e.g._, "VirtualMachineExtension", "VirtualNetworkPeering", "SqlDatabase")
4+
35
### Top-level resource
46

57
All top-level resources should have a `Set-*` cmdlet that allows users to update an existing resource _if the API follows `PUT` semantics_. If the API supports `PATCH` semantics, then the cmdlet should be `Update-*` (see below). The user can update an existing resource by providing all identity properties, the resource id, or the object representation of the resource. Similar to the `New-*` cmdlet, properties that are required by the API should be mandatory parameters, and in the case where different combinations of properties are needed depending on a provided value (_e.g._, Windows and Linux VMs have different properties), multiple parameter sets should be used. This cmdlet should implement `SupportsShouldProcess` to allow users to provide the `-WhatIf` parameter and see what the result of executing the cmdlet is without the resource actually being updated.

documentation/development-docs/examples/update-cmdlet-example.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## `Update-*` cmdlet example
22

3+
_Note_: for the below examples, the string "TopLevelResource" would be replaced with the name of your top-level resource (_e.g._, "VirtualMachine", "VirtualNetwork", "SqlServer"), and the string "ChildResource" would be replaced with the name of your child resource (_e.g._, "VirtualMachineExtension", "VirtualNetworkPeering", "SqlDatabase")
4+
35
### Top-level resource
46

57
All top-level resources should have an `Update-*` cmdlet that allows users to update an existing resource _if the API follows `PATCH` semantics_. If the API supports `PUT` semantics, then the cmdlet should be `Set-*` (see above). The user can update an existing resource by providing all identity properties, the resource id, or the object representation of the resource. Similar to the `New-*` cmdlet, properties that are required by the API should be mandatory parameters, and in the case where different combinations of properties are needed depending on a provided value (_e.g._, Windows and Linux VMs have different properties), multiple parameter sets should be used. This cmdlet should implement `SupportsShouldProcess` to allow users to provide the `-WhatIf` parameter and see what the result of executing the cmdlet is without the resource actually being updated.
File renamed without changes.

0 commit comments

Comments
 (0)