-
Notifications
You must be signed in to change notification settings - Fork 4k
Aladdin generated examples for Compute, Monitor, Network, Resources, Sql, Websites #15567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aladdin generated examples for Compute, Monitor, Network, Resources, Sql, Websites #15567
Conversation
aladdindoc
commented
Jul 28, 2021
- Add Aladdin crafted examples.
- Add new examples to the following modules: Compute Monitor Network Resources Sql Websites
Thank you for your contribution aladdindoc! We will review the pull request and get back to you soon. |
Hi Mike would you be able to review this? Thanks |
@@ -56,6 +56,15 @@ Modifies the state of a VMSS instance. (autogenerated) | |||
|
|||
```powershell <!-- Aladdin Generated Example --> | |||
Set-AzVmssVM -InstanceId <String> -Reimage -ResourceGroupName myresourcegroup -VMScaleSetName 'VMSS001' | |||
```powershell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 59 appears to be the ending code fence. Closing code blocks should not include a language type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look why the language type was added.
@@ -37,7 +37,7 @@ This cmdlet implements the ShouldProcess pattern, i.e. it might request confirma | |||
## EXAMPLES | |||
|
|||
### Example 1: Create an Autoscale setting | |||
``` | |||
```powershell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a closing code fence for example 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's at the line 50.
@@ -32,6 +32,15 @@ PS C:\> $gw = Set-AzApplicationGateway -ApplicationGateway $gw | |||
|
|||
The first command gets the application gateway and stores it in $gw variable. The second command creates a new trusted client CA certificate chain taking path of the client CA certificate as input. The third command creates a SSL profile using trusted client certificate. The fourth command updates the Application Gateway. | |||
|
|||
### Example 2 | |||
|
|||
The first command gets the application gateway and stores it in $gw variable. The second command creates a new trusted client CA certificate chain taking path of the client CA certificate as input. The third command creates a SSL profile using trusted client certificate. The fourth command updates the Application Gateway. (autogenerated) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text appears to be duplicated from the previous paragraph and doesn't match up with what's occurring in the example.
|
||
<!-- Aladdin Generated Example --> | ||
```powershell | ||
Get-AzVirtualNetworkGatewayVpnClientConnectionHealth -ResourceGroupName resourceGroup -VirtualNetworkGatewayName 'ContosoVirtualNetwork' -ResourceName 'ContosoVirtualNetwork' -InputObject <PSVirtualNetworkGateway> -ResourceId <String> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameters VirtualNetworkGatewayName
, InputObject
, and ResourceId
are in mutually exclusive parameter sets and can't be used together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to check that they are mutually exclusive? In the documentation, there is only one parameter set and all those three parameters are optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter set documentation appears to be inaccurate for the Get-AzVirtualNetworkGatewayVpnClientConnectionHealth
cmdlet. Get-Command -Name Get-AzVirtualNetworkGatewayVpnClientConnectionHealth -Syntax
is the command I used to determine the parameter sets.
@@ -25,7 +25,7 @@ Creates a disk encryption set. | |||
### Example 1 | |||
```powershell | |||
PS C:\> $config = New-AzDiskEncryptionSetConfig -Location 'westcentralus' -KeyUrl "https://valut1.vault.azure.net:443/keys/key1/mykey" -SourceVaultId '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.KeyVault/vaults/vault1 -IdentityType 'SystemAssigned' | |||
PS C:\> New-AzDiskEncryptionSet -ResourceGroupName 'rg1' -Name 'enc1' -DiskEncryptionSet $config; | |||
PS C:\> New-AzDiskEncryptionSet -ResourceGroupName 'rg1' -Name 'enc1' -DiskEncryptionSet $config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't a DiskEncryptionSet
parameter. DiskEncryptionSet
is a parameter alias for the InputObject
parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an existing example. Aladdin doesn't add it.
I can convert it to $config | New-AzDiskEncryptionSet ...
|
||
<!-- Aladdin Generated Example --> | ||
```powershell | ||
Add-AzAutoscaleSetting -AutoscaleProfile <List`1> -DisableSetting -Location 'East US' -Name 'MySetting' -ResourceGroupName 'Default-Web-EastUS' -TargetResourceId '/subscriptions/00000000-0000-0000-0000-00000000000000000/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value for the AutoscaleProfile
parameter should be <List[AutoscaleProfile]>
.
PS C:\>New-AzDataCollectionRule -Location 'East US 2 EUAP' -ResourceGroupName 'testdcr' ` | ||
-RuleName 'newDcrEx2' -RuleFile 'C:\samples\dcrEx2.json' ` | ||
-Description 'Dcr description' ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this example differ from example 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. And this is not added by Aladdin. I can remove it manually.
The change here is to append '`' at the end to make the commands in both example properly multiline commands.
|
||
<!-- Aladdin Generated Example --> | ||
```powershell | ||
Disconnect-AzVirtualNetworkGatewayVpnConnection -ResourceGroupName vnetgwrg -VirtualNetworkGatewayName 'ContosoVirtualNetwork' -VpnConnectionId @('IKEv2_00000000-0000-0000-0000-00000000000000000') -InputObject <PSVirtualNetworkGateway> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameters ResourceGroupName
and VirtualNetworkGatewayName
are in a different parameter set than VpnConnectionId
and InputObject
and can't be used together because they're mutually exclusive.
|
||
<!-- Aladdin Generated Example --> | ||
```powershell | ||
New-AzExpressRouteGateway -MaxScaleUnits <UInt32> -MinScaleUnits 2 -Name 'testExpressRoutegw' -ResourceGroupName 'testRG' -Tag '/Sql' -VirtualHubName <String> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Tag
parameter requires a hashtable for its value. The specified value is not a valid hashtable.
|
||
<!-- Aladdin Generated Example --> | ||
```powershell | ||
Set-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway <PSApplicationGateway> -MaxCapacity 4 -MinCapacity 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem valid. How can the minimum capacity be more than the maximum capacity?
|
||
<!-- Aladdin Generated Example --> | ||
```powershell | ||
Add-AzLoadBalancerInboundNatRuleConfig -BackendPort 3350 -FrontendIpConfiguration <PSFrontendIPConfiguration> -FrontendPort 3350 -Name 'NewNatRule' -Protocol 'TCP' -LoadBalancer <PSLoadBalancer> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove this example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM