From 976d44fe490478a3f7b962bf178e375d9055f4f9 Mon Sep 17 00:00:00 2001 From: Daeun Yim <69321306+DaeunYim@users.noreply.github.com> Date: Tue, 1 Dec 2020 00:20:55 -0800 Subject: [PATCH] Added description and synopsis for mysql cmdlets (#13626) * Generate flexible server cmdlets (#13269) * test commit with server mgmt md files * cmdlet design draft * fixed errors for mysql md files * fixed errors for mysql md files * fixing mistakes * resolved comments * mysql cmdlets customization verified * mysql modified * postgres customized cmdlets and readme * mysql postgres customized cmdlets and docs * initial commit for mysql pg module * mysql test success * pg module * postgresql cmdlet update test fixed * example document fixed * Revert "example document fixed" This reverts commit 6c60dbf77e9f38a1fe1f817dbc8a3276187898b4. * align single server test with flexible server * docs fixed * docs files moved from exports to upper folder * typo fixed * revert postgresql * configuration fixed * cred scan added * cred scan issue resolved * Regenerate doc of the MySql * comments resolved * synopsis and description added * Fix MySql doc issues * Revert examples/New-AzMySqlVirtualNetworkRule.md incorrect change * Update doc/*.md Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com> Co-authored-by: msJinLei --- .../custom/New-AzMySqlFlexibleServer.ps1 | 6 +++++ .../New-AzMySqlFlexibleServerFirewallRule.ps1 | 4 ++-- .../New-AzMySqlFlexibleServerReplica.ps1 | 7 ++++++ .../custom/Update-AzMySqlFlexibleServer.ps1 | 8 ++++++- ...ate-AzMySqlFlexibleServerConfiguration.ps1 | 7 ++++++ ...date-AzMySqlFlexibleServerFirewallRule.ps1 | 4 ++-- src/MySql/docs/Az.MySql.md | 12 +++++----- src/MySql/docs/New-AzMySqlFlexibleServer.md | 2 +- .../New-AzMySqlFlexibleServerFirewallRule.md | 4 ++-- .../docs/New-AzMySqlFlexibleServerReplica.md | 2 +- .../docs/New-AzMySqlVirtualNetworkRule.md | 20 ++++++---------- .../docs/Update-AzMySqlFlexibleServer.md | 8 +++---- ...date-AzMySqlFlexibleServerConfiguration.md | 24 ++++++++++--------- ...pdate-AzMySqlFlexibleServerFirewallRule.md | 4 ++-- .../examples/New-AzMySqlVirtualNetworkRule.md | 21 ++++++---------- 15 files changed, 74 insertions(+), 59 deletions(-) diff --git a/src/MySql/custom/New-AzMySqlFlexibleServer.ps1 b/src/MySql/custom/New-AzMySqlFlexibleServer.ps1 index 34b9300a4013..f25d490deb15 100644 --- a/src/MySql/custom/New-AzMySqlFlexibleServer.ps1 +++ b/src/MySql/custom/New-AzMySqlFlexibleServer.ps1 @@ -13,6 +13,12 @@ # limitations under the License. # ---------------------------------------------------------------------------------- +<# +.Synopsis +Creates a new MySQL flexible server +.Description +Creates a new MySQL flexible server +#> function New-AzMySqlFlexibleServer { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] diff --git a/src/MySql/custom/New-AzMySqlFlexibleServerFirewallRule.ps1 b/src/MySql/custom/New-AzMySqlFlexibleServerFirewallRule.ps1 index f769101b126c..2ebfba5f8681 100644 --- a/src/MySql/custom/New-AzMySqlFlexibleServerFirewallRule.ps1 +++ b/src/MySql/custom/New-AzMySqlFlexibleServerFirewallRule.ps1 @@ -15,9 +15,9 @@ <# .Synopsis -Creates a new firewall rule or updates an existing firewall rule. +Creates a new firewall rule for MySQL flexible server .Description -Creates a new firewall rule or updates an existing firewall rule. +Creates a new firewall rule for MySQL flexible server #> function New-AzMySqlFlexibleServerFirewallRule { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRule])] diff --git a/src/MySql/custom/New-AzMySqlFlexibleServerReplica.ps1 b/src/MySql/custom/New-AzMySqlFlexibleServerReplica.ps1 index 60068173d5f4..731b910d1b57 100644 --- a/src/MySql/custom/New-AzMySqlFlexibleServerReplica.ps1 +++ b/src/MySql/custom/New-AzMySqlFlexibleServerReplica.ps1 @@ -13,6 +13,13 @@ # limitations under the License. # ---------------------------------------------------------------------------------- +<# +.Synopsis +Creates a replica server for a MySQL flexible server +.Description +Creates a replica server for a MySQL flexible server +#> + function New-AzMySqlFlexibleServerReplica { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] diff --git a/src/MySql/custom/Update-AzMySqlFlexibleServer.ps1 b/src/MySql/custom/Update-AzMySqlFlexibleServer.ps1 index 33e699e24137..ee1d9961c2ad 100644 --- a/src/MySql/custom/Update-AzMySqlFlexibleServer.ps1 +++ b/src/MySql/custom/Update-AzMySqlFlexibleServer.ps1 @@ -13,10 +13,16 @@ # limitations under the License. # ---------------------------------------------------------------------------------- +<# +.Synopsis +Updates an existing MySQL flexible server. The request body can contain one to many of the properties present in the normal server definition. Use Update-AzMySqlFlexibleServerConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count. +.Description +Updates an existing MySQL flexible server. The request body can contain one to many of the properties present in the normal server definition. Use Update-AzMySqlFlexibleServerConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count. +#> + function Update-AzMySqlFlexibleServer { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] - [Microsoft.Azure.PowerShell.Cmdlets.MySql.Description('Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. Use Update-AzMySqlFlexibleServerConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count.')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory, HelpMessage='The name of the server.')] [Alias('ServerName')] diff --git a/src/MySql/custom/Update-AzMySqlFlexibleServerConfiguration.ps1 b/src/MySql/custom/Update-AzMySqlFlexibleServerConfiguration.ps1 index 88014b3de2a4..2ddd746b9799 100644 --- a/src/MySql/custom/Update-AzMySqlFlexibleServerConfiguration.ps1 +++ b/src/MySql/custom/Update-AzMySqlFlexibleServerConfiguration.ps1 @@ -13,6 +13,13 @@ # limitations under the License. # ---------------------------------------------------------------------------------- +<# +.Synopsis +Updates information about a configuration of a MySQL flexible server. +.Description +Updates information about a configuration of a MySQL flexible server. +#> + function Update-AzMySqlFlexibleServerConfiguration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IConfigurationAutoGenerated])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] diff --git a/src/MySql/custom/Update-AzMySqlFlexibleServerFirewallRule.ps1 b/src/MySql/custom/Update-AzMySqlFlexibleServerFirewallRule.ps1 index a3a9f2946de7..f73867622805 100644 --- a/src/MySql/custom/Update-AzMySqlFlexibleServerFirewallRule.ps1 +++ b/src/MySql/custom/Update-AzMySqlFlexibleServerFirewallRule.ps1 @@ -15,9 +15,9 @@ <# .Synopsis -Creates a new firewall rule or updates an existing firewall rule. +Updates an existing firewall rule. .Description -Creates a new firewall rule or updates an existing firewall rule. +Updates an existing firewall rule. #> function Update-AzMySqlFlexibleServerFirewallRule { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRule])] diff --git a/src/MySql/docs/Az.MySql.md b/src/MySql/docs/Az.MySql.md index 0e6ef0286b5d..4920753100d9 100644 --- a/src/MySql/docs/Az.MySql.md +++ b/src/MySql/docs/Az.MySql.md @@ -1,6 +1,6 @@ --- Module Name: Az.MySql -Module Guid: fc8b3a19-b288-4f67-a4ff-b2d82a11cd6a +Module Guid: 6fb456f8-3967-40b0-a0af-3be8e13ae017 Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.mysql Help Version: 1.0.0.0 Locale: en-US @@ -54,7 +54,7 @@ Creates a new server. Creates a new database or updates an existing database. ### [New-AzMySqlFlexibleServerFirewallRule](New-AzMySqlFlexibleServerFirewallRule.md) -Creates a new firewall rule or updates an existing firewall rule. +Creates a new firewall rule for MySQL flexible server ### [New-AzMySqlFlexibleServerReplica](New-AzMySqlFlexibleServerReplica.md) Creates a new replica from an existing database. @@ -112,18 +112,18 @@ Use Update-AzMySqlServer instead if you want update AdministratorLoginPassword, Creates a new firewall rule or updates an existing firewall rule. ### [Update-AzMySqlFlexibleServer](Update-AzMySqlFlexibleServer.md) -Updates an existing server. +Updates an existing MySQL flexible server. The request body can contain one to many of the properties present in the normal server definition. -Use Update-AzMySqlConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count. +Use Update-AzMySqlFlexibleServerConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count. ### [Update-AzMySqlFlexibleServerConfiguration](Update-AzMySqlFlexibleServerConfiguration.md) - +Updates information about a configuration of a MySQL flexible server. ### [Update-AzMySqlFlexibleServerDatabase](Update-AzMySqlFlexibleServerDatabase.md) Creates a new database or updates an existing database. ### [Update-AzMySqlFlexibleServerFirewallRule](Update-AzMySqlFlexibleServerFirewallRule.md) -Creates a new firewall rule or updates an existing firewall rule. +Updates an existing firewall rule. ### [Update-AzMySqlServer](Update-AzMySqlServer.md) Updates an existing server. diff --git a/src/MySql/docs/New-AzMySqlFlexibleServer.md b/src/MySql/docs/New-AzMySqlFlexibleServer.md index cb4af07e2305..ec4157009e98 100644 --- a/src/MySql/docs/New-AzMySqlFlexibleServer.md +++ b/src/MySql/docs/New-AzMySqlFlexibleServer.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzMySqlFlexibleServer ## SYNOPSIS -Creates a new server. +Creates a new MySQL flexible server ## SYNTAX diff --git a/src/MySql/docs/New-AzMySqlFlexibleServerFirewallRule.md b/src/MySql/docs/New-AzMySqlFlexibleServerFirewallRule.md index 4a337eb76ce8..942359119206 100644 --- a/src/MySql/docs/New-AzMySqlFlexibleServerFirewallRule.md +++ b/src/MySql/docs/New-AzMySqlFlexibleServerFirewallRule.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzMySqlFlexibleServerFirewallRule ## SYNOPSIS -Creates a new firewall rule or updates an existing firewall rule. +Creates a new firewall rule for MySQL flexible server ## SYNTAX @@ -34,7 +34,7 @@ New-AzMySqlFlexibleServerFirewallRule -ResourceGroupName -ServerName {{ Add code here }} +PS C:\> $ID = "/subscriptions//resourceGroups/PowershellMySqlTest/providers/Microsoft.Network/virtualNetworks/MySqlVNet/subnets/MysqlSubnet1" +PS C:\> New-AzMySqlVirtualNetworkRule -Name vnet -ResourceGroupName PowershellMySqlTest -ServerName mysql-test -SubnetId $ID -{{ Add output here }} +Name Type +---- ---- +vnet Microsoft.DBforMySQL/servers/virtualNetworkRules ``` -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` - -{{ Add description here }} +These cmdlets create a MySql server Virtual Network Rule. ## PARAMETERS diff --git a/src/MySql/docs/Update-AzMySqlFlexibleServer.md b/src/MySql/docs/Update-AzMySqlFlexibleServer.md index 0a70d8f9f25f..7288b6a7ab1c 100644 --- a/src/MySql/docs/Update-AzMySqlFlexibleServer.md +++ b/src/MySql/docs/Update-AzMySqlFlexibleServer.md @@ -8,9 +8,9 @@ schema: 2.0.0 # Update-AzMySqlFlexibleServer ## SYNOPSIS -Updates an existing server. +Updates an existing MySQL flexible server. The request body can contain one to many of the properties present in the normal server definition. -Use Update-AzMySqlConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count. +Use Update-AzMySqlFlexibleServerConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count. ## SYNTAX @@ -33,9 +33,9 @@ Update-AzMySqlFlexibleServer -InputObject [-AdministratorLoginP ``` ## DESCRIPTION -Updates an existing server. +Updates an existing MySQL flexible server. The request body can contain one to many of the properties present in the normal server definition. -Use Update-AzMySqlConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count. +Use Update-AzMySqlFlexibleServerConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count. ## EXAMPLES diff --git a/src/MySql/docs/Update-AzMySqlFlexibleServerConfiguration.md b/src/MySql/docs/Update-AzMySqlFlexibleServerConfiguration.md index e70c30e42f1a..263d9da398e9 100644 --- a/src/MySql/docs/Update-AzMySqlFlexibleServerConfiguration.md +++ b/src/MySql/docs/Update-AzMySqlFlexibleServerConfiguration.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Update-AzMySqlFlexibleServerConfiguration ## SYNOPSIS - +Updates information about a configuration of a MySQL flexible server. ## SYNTAX @@ -26,7 +26,7 @@ Update-AzMySqlFlexibleServerConfiguration -InputObject [-Source ``` ## DESCRIPTION - +Updates information about a configuration of a MySQL flexible server. ## EXAMPLES @@ -56,7 +56,7 @@ These cmdlets update MySql configuration by identity. ## PARAMETERS ### -AsJob - +Run the command as a job ```yaml Type: System.Management.Automation.SwitchParameter @@ -71,7 +71,7 @@ Accept wildcard characters: False ``` ### -DefaultProfile - +The credentials, account, tenant, and subscription used for communication with Azure. ```yaml Type: System.Management.Automation.PSObject @@ -86,6 +86,7 @@ Accept wildcard characters: False ``` ### -InputObject +Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml @@ -101,7 +102,7 @@ Accept wildcard characters: False ``` ### -Name - +The name of the server configuration. ```yaml Type: System.String @@ -116,7 +117,7 @@ Accept wildcard characters: False ``` ### -NoWait - +Run the command asynchronously ```yaml Type: System.Management.Automation.SwitchParameter @@ -131,7 +132,8 @@ Accept wildcard characters: False ``` ### -ResourceGroupName - +The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -146,7 +148,7 @@ Accept wildcard characters: False ``` ### -ServerName - +The name of the server. ```yaml Type: System.String @@ -177,7 +179,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId - +The ID of the target subscription. ```yaml Type: System.String @@ -192,7 +194,7 @@ Accept wildcard characters: False ``` ### -Value - +Value of the configuration. ```yaml Type: System.String @@ -257,7 +259,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : +INPUTOBJECT : Identity Parameter - `[ConfigurationName ]`: The name of the server configuration. - `[DatabaseName ]`: The name of the database. - `[FirewallRuleName ]`: The name of the server firewall rule. diff --git a/src/MySql/docs/Update-AzMySqlFlexibleServerFirewallRule.md b/src/MySql/docs/Update-AzMySqlFlexibleServerFirewallRule.md index 7d83c69a56cb..ad043dede440 100644 --- a/src/MySql/docs/Update-AzMySqlFlexibleServerFirewallRule.md +++ b/src/MySql/docs/Update-AzMySqlFlexibleServerFirewallRule.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Update-AzMySqlFlexibleServerFirewallRule ## SYNOPSIS -Creates a new firewall rule or updates an existing firewall rule. +Updates an existing firewall rule. ## SYNTAX @@ -40,7 +40,7 @@ Update-AzMySqlFlexibleServerFirewallRule -InputObject -EndIPAdd ``` ## DESCRIPTION -Creates a new firewall rule or updates an existing firewall rule. +Updates an existing firewall rule. ## EXAMPLES diff --git a/src/MySql/examples/New-AzMySqlVirtualNetworkRule.md b/src/MySql/examples/New-AzMySqlVirtualNetworkRule.md index 093355d11d50..9b5f3354f121 100644 --- a/src/MySql/examples/New-AzMySqlVirtualNetworkRule.md +++ b/src/MySql/examples/New-AzMySqlVirtualNetworkRule.md @@ -1,18 +1,11 @@ -### Example 1: {{ Add title here }} +### Example 1: Create a new MySql server Virtual Network Rule ```powershell -PS C:\> {{ Add code here }} +PS C:\> $ID = "/subscriptions//resourceGroups/PowershellMySqlTest/providers/Microsoft.Network/virtualNetworks/MySqlVNet/subnets/MysqlSubnet1" +PS C:\> New-AzMySqlVirtualNetworkRule -Name vnet -ResourceGroupName PowershellMySqlTest -ServerName mysql-test -SubnetId $ID -{{ Add output here }} +Name Type +---- ---- +vnet Microsoft.DBforMySQL/servers/virtualNetworkRules ``` -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` - -{{ Add description here }} - +These cmdlets create a MySql server Virtual Network Rule. \ No newline at end of file