Skip to content

Commit

Permalink
Added description and synopsis for mysql cmdlets (#13626)
Browse files Browse the repository at this point in the history
* 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 6c60dbf.

* 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 <[email protected]>
Co-authored-by: msJinLei <[email protected]>
  • Loading branch information
3 people authored Dec 1, 2020
1 parent 4fd9e51 commit 976d44f
Show file tree
Hide file tree
Showing 15 changed files with 74 additions and 59 deletions.
6 changes: 6 additions & 0 deletions src/MySql/custom/New-AzMySqlFlexibleServer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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')]
Expand Down
4 changes: 2 additions & 2 deletions src/MySql/custom/New-AzMySqlFlexibleServerFirewallRule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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])]
Expand Down
7 changes: 7 additions & 0 deletions src/MySql/custom/New-AzMySqlFlexibleServerReplica.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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')]
Expand Down
8 changes: 7 additions & 1 deletion src/MySql/custom/Update-AzMySqlFlexibleServer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')]
Expand Down
4 changes: 2 additions & 2 deletions src/MySql/custom/Update-AzMySqlFlexibleServerFirewallRule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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])]
Expand Down
12 changes: 6 additions & 6 deletions src/MySql/docs/Az.MySql.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/MySql/docs/New-AzMySqlFlexibleServer.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzMySqlFlexibleServer

## SYNOPSIS
Creates a new server.
Creates a new MySQL flexible server

## SYNTAX

Expand Down
4 changes: 2 additions & 2 deletions src/MySql/docs/New-AzMySqlFlexibleServerFirewallRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -34,7 +34,7 @@ New-AzMySqlFlexibleServerFirewallRule -ResourceGroupName <String> -ServerName <S
```

## DESCRIPTION
Creates a new firewall rule or updates an existing firewall rule.
Creates a new firewall rule for MySQL flexible server

## EXAMPLES

Expand Down
2 changes: 1 addition & 1 deletion src/MySql/docs/New-AzMySqlFlexibleServerReplica.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzMySqlFlexibleServerReplica

## SYNOPSIS
Creates a new replica from an existing database.
Creates a replica server for a MySQL flexible server

## SYNTAX

Expand Down
20 changes: 7 additions & 13 deletions src/MySql/docs/New-AzMySqlVirtualNetworkRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,17 @@ Creates or updates an existing virtual network rule.

## EXAMPLES

### 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/<SubscriptionId>/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

Expand Down
8 changes: 4 additions & 4 deletions src/MySql/docs/Update-AzMySqlFlexibleServer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -33,9 +33,9 @@ Update-AzMySqlFlexibleServer -InputObject <IMySqlIdentity> [-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

Expand Down
24 changes: 13 additions & 11 deletions src/MySql/docs/Update-AzMySqlFlexibleServerConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# Update-AzMySqlFlexibleServerConfiguration

## SYNOPSIS

Updates information about a configuration of a MySQL flexible server.

## SYNTAX

Expand All @@ -26,7 +26,7 @@ Update-AzMySqlFlexibleServerConfiguration -InputObject <IMySqlIdentity> [-Source
```

## DESCRIPTION

Updates information about a configuration of a MySQL flexible server.

## EXAMPLES

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -101,7 +102,7 @@ Accept wildcard characters: False
```
### -Name
The name of the server configuration.
```yaml
Type: System.String
Expand All @@ -116,7 +117,7 @@ Accept wildcard characters: False
```
### -NoWait
Run the command asynchronously
```yaml
Type: System.Management.Automation.SwitchParameter
Expand All @@ -131,7 +132,8 @@ Accept wildcard characters: False
```
### -ResourceGroupName
The name of the resource group.
The name is case insensitive.
```yaml
Type: System.String
Expand All @@ -146,7 +148,7 @@ Accept wildcard characters: False
```
### -ServerName
The name of the server.
```yaml
Type: System.String
Expand Down Expand Up @@ -177,7 +179,7 @@ Accept wildcard characters: False
```
### -SubscriptionId
The ID of the target subscription.
```yaml
Type: System.String
Expand All @@ -192,7 +194,7 @@ Accept wildcard characters: False
```
### -Value
Value of the configuration.
```yaml
Type: System.String
Expand Down Expand Up @@ -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 <IMySqlIdentity>:
INPUTOBJECT <IMySqlIdentity>: Identity Parameter
- `[ConfigurationName <String>]`: The name of the server configuration.
- `[DatabaseName <String>]`: The name of the database.
- `[FirewallRuleName <String>]`: The name of the server firewall rule.
Expand Down
4 changes: 2 additions & 2 deletions src/MySql/docs/Update-AzMySqlFlexibleServerFirewallRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -40,7 +40,7 @@ Update-AzMySqlFlexibleServerFirewallRule -InputObject <IMySqlIdentity> -EndIPAdd
```

## DESCRIPTION
Creates a new firewall rule or updates an existing firewall rule.
Updates an existing firewall rule.

## EXAMPLES

Expand Down
21 changes: 7 additions & 14 deletions src/MySql/examples/New-AzMySqlVirtualNetworkRule.md
Original file line number Diff line number Diff line change
@@ -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/<SubscriptionId>/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.

0 comments on commit 976d44f

Please sign in to comment.