Skip to content

Commit 8f1485f

Browse files
committed
revert deleted example
1 parent 9431813 commit 8f1485f

31 files changed

+806
-261
lines changed

src/MySql/MySql.Autorest/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@
2727

2828

2929

30+

src/MySql/MySql.Autorest/docs/Get-AzMySqlFlexibleServerConnectionString.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,27 @@ Get the connection string according to client connection provider.
2929

3030
## EXAMPLES
3131

32-
### Example 1: {{ Add title here }}
32+
### Example 1: Get connection string by name
3333
```powershell
34-
{{ Add code here }}
34+
Get-AzMySqlFlexibleServerConnectionString -Client Python -ResourceGroupName PowershellMySqlTest -Name mysql-test
3535
```
3636

3737
```output
38-
{{ Add output here (remove the output block if the example doesn't have an output) }}
38+
cnx = mysql.connector.connect(user=mysql_user, password="{your_password}", host="mysql-test.mysql.database.azure.com", port=3306, database="{your_database}", ssl_ca="{ca-cert filename}", ssl_disabled=False)
3939
```
4040

41-
{{ Add description here }}
41+
This cmdlet shows connection string of a client by server name.
4242

43-
### Example 2: {{ Add title here }}
43+
### Example 2: Get MySql server connection string by identity
4444
```powershell
45-
{{ Add code here }}
45+
Get-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -ServerName mysql-test | Get-AzMySqlFlexibleServerConnectionString -Client PHP
4646
```
4747

4848
```output
49-
{{ Add output here (remove the output block if the example doesn't have an output) }}
49+
$con=mysqli_init(); mysqli_real_connect($con, "mysql-test.mysql.database.azure.com", "mysql_test", {your_password}, {your_database}, 3306);
5050
```
5151

52-
{{ Add description here }}
52+
This cmdlet gets MySql server connection string by identity.
5353

5454
## PARAMETERS
5555

src/MySql/MySql.Autorest/docs/Get-AzMySqlFlexibleServerLocationBasedCapability.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,36 @@ Get the available SKU information for the location
2222

2323
## EXAMPLES
2424

25-
### Example 1: {{ Add title here }}
25+
### Example 1: Get location capabilities by location name
2626
```powershell
27-
{{ Add code here }}
27+
Get-AzMySqlFlexibleServerLocationBasedCapability -Location westus2
2828
```
2929

3030
```output
31-
{{ Add output here (remove the output block if the example doesn't have an output) }}
31+
"Please refer to https://aka.ms/mysql-pricing for pricing details"
32+
33+
SKU Memory Tier vCore
34+
--- ------ ---- -----
35+
Standard_B1s 1024 Burstable 1
36+
Standard_B1ms 2048 Burstable 1
37+
Standard_B2s 2048 Burstable 2
38+
Standard_D2ds_v4 4096 GeneralPurpose 2
39+
Standard_D4ds_v4 4096 GeneralPurpose 4
40+
Standard_D8ds_v4 4096 GeneralPurpose 8
41+
Standard_D16ds_v4 4096 GeneralPurpose 16
42+
Standard_D32ds_v4 4096 GeneralPurpose 32
43+
Standard_D48ds_v4 4096 GeneralPurpose 48
44+
Standard_D64ds_v4 4096 GeneralPurpose 64
45+
Standard_E2ds_v4 8192 MemoryOptimized 2
46+
Standard_E4ds_v4 8192 MemoryOptimized 4
47+
Standard_E8ds_v4 8192 MemoryOptimized 8
48+
Standard_E16ds_v4 8192 MemoryOptimized 16
49+
Standard_E32ds_v4 8192 MemoryOptimized 32
50+
Standard_E48ds_v4 8192 MemoryOptimized 48
51+
Standard_E64ds_v4 8192 MemoryOptimized 64
3252
```
3353

34-
{{ Add description here }}
35-
36-
### Example 2: {{ Add title here }}
37-
```powershell
38-
{{ Add code here }}
39-
```
40-
41-
```output
42-
{{ Add output here (remove the output block if the example doesn't have an output) }}
43-
```
44-
45-
{{ Add description here }}
54+
This cmdlet shows basic sku information of the provided location.
4655

4756
## PARAMETERS
4857

src/MySql/MySql.Autorest/docs/New-AzMySqlFlexibleServer.md

Lines changed: 148 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,167 @@ Creates a new MySQL flexible server.
2727

2828
## EXAMPLES
2929

30-
### Example 1: {{ Add title here }}
30+
### Example 1: Create a new MySql flexible server with arguments
3131
```powershell
32-
{{ Add code here }}
32+
$password = ConvertTo-SecureString -String "1234" -Force -AsPlainText
33+
New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -Location eastus -AdministratorUserName mysqltest -AdministratorLoginPassword $password -Sku Standard_D2ds_v4 -SkuTier Burstable -Version 12 -StorageInMb 20480 -PublicAccess none -Zone 1 -BackupRetentionDay 10 -StorageAutogrow Enabled -Iops 500 -HighAvailability ZoneRedundant
3334
```
3435

3536
```output
36-
{{ Add output here (remove the output block if the example doesn't have an output) }}
37+
Checking the existence of the resource group PowershellMySqlTest ...
38+
Resource group PowershellMySqlTest exists ? : True
39+
Creating MySQL server mysql-test in group MySqlTest...
40+
Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
41+
42+
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
43+
---- -------- ------- ------- ------------------ ------- -------------
44+
mysql-test East US Standard_D2ds_v4 GeneralPurpose admin 5.7 20
45+
46+
```
47+
48+
49+
50+
### Example 2: Create a new MySql flexible server with default setting
51+
```powershell
52+
New-AzMySqlFlexibleServer
3753
```
3854

39-
{{ Add description here }}
55+
```output
56+
Creating resource group group00000000...
57+
Creating new vnet VNETserver00000000 in resource group group00000000
58+
Creating new subnet Subnetserver00000000 in resource group group00000000 and delegating it to Microsoft.DBforMySQL/flexibleServers
59+
Creating MySQL server server00000000 in group group00000000...
60+
Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
61+
Creating database flexibleserverdb...
62+
63+
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
64+
---- -------- ------- ------- ------------------ ------- -------------
65+
mysql-test West US 2 Standard_B1ms Burstable admin 5.7 32
66+
```
67+
68+
This cmdlet creates MySql flexible server with default parameter values and provision the server inside a new virtual network and have a subnet delegated to the server.
69+
The default values of location is West US 2, Sku is Standard_B1ms, Sku tier is Burstable, and storage size is 10GiB.
70+
71+
72+
If you want to find the auto-generated password for your server, use ConvertFrom-SecureString to convert 'SecuredPassword' property to plain text.
73+
74+
(E.g., $server.SecuredPassword | ConvertFrom-SecureString -AsPlainText)
4075

41-
### Example 2: {{ Add title here }}
76+
### Example 3: Create a new MySql flexible server with existing Subnet
4277
```powershell
43-
{{ Add code here }}
78+
$Subnet = '/subscriptions/00000000-0000-0000-0000-0000000000/resourceGroups/PowershellPostgreSqlTest/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/subnetname'
79+
$DnsZone = '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresqltest/providers/Microsoft.Network/privateDnsZones/testserver.private.mysql.database.azure.com'
80+
New-AzMySqlFlexibleServer -ResourceGroupName postgresqltest -ServerName testserver -Subnet $Subnet -PrivateDnsZone $DnsZone
4481
```
4582

4683
```output
47-
{{ Add output here (remove the output block if the example doesn't have an output) }}
84+
Resource group PowershellPostgreSqlTest exists ? : True
85+
You have supplied a subnet Id. Verifying its existence...
86+
Creating PostgreSQL server testserver in group PowershellPostgreSqlTest...
87+
Your server server00000000 is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/postgresql-pricing for pricing details
88+
Creating database flexibleserverdb...
89+
90+
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
91+
---- -------- ------- ------- ------------------ ------- -------------
92+
mysql-test West US 2 Standard_B1ms Burstable admin 5.7 32
93+
94+
```
95+
96+
This cmdlet creates PostgreSql flexible server with an existing Subnet Id provided by a user.
97+
The subnet will be delegated to PostgreSQL flexible server if not already delegated.
98+
You cannot use a subnet delegated to different services.
99+
100+
### Example 4: Create a new MySql flexible server with virtual network and subnet name
101+
```powershell
102+
$DnsZone = '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresqltest/providers/Microsoft.Network/privateDnsZones/testserver.private.mysql.database.azure.com'
103+
New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -Vnet mysql-vnet -Subnet mysql-subnet -VnetPrefix 10.0.0.0/16 -SubnetPrefix 10.0.0.0/24 -PrivateDnsZone $DnsZone
104+
```
105+
106+
```output
107+
Resource group PowershellMySqlTest exists ? : True
108+
Creating new vnet mysql-vnet in resource group PowershellMySqlTest
109+
Creating new subnet mysql-subnet in resource group PowershellMySqlTest and delegating it to Microsoft.DBforMySQL/flexibleServers
110+
Creating MySQL server mysql-test in group PowershellMySqlTest...
111+
Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
112+
Creating database flexibleserverdb...
113+
114+
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
115+
---- -------- ------- ------- ------------------ ------- -------------
116+
mysql-test West US 2 Standard_B1ms Burstable admin 5.7 32
117+
118+
```
119+
120+
This cmdlet creates MySql flexible server with vnet name, subnet name, vnet prefix, and subnet prefix.
121+
If the virtual network and subnet don't exist, the cmdlet creates one.
122+
123+
### Example 5: Create a new MySql flexible server with virtual network
124+
```powershell
125+
$Vnet = 'vnetname'
126+
$DnsZone = '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresqltest/providers/Microsoft.Network/privateDnsZones/testserver.private.mysql.database.azure.com'
127+
New-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -Vnet $Vnet -PrivateDnsZone $DnsZone
128+
129+
# or
130+
131+
$Vnet = '/subscriptions/00000000-0000-0000-0000-0000000000/resourceGroups/PowershellMySqlTest/providers/Microsoft.Network/virtualNetworks/vnetname'
132+
New-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -Vnet $Vnet -PrivateDnsZone $DnsZone
133+
```
134+
135+
```output
136+
Resource group PowershellMySqlTest exists ? : True
137+
You have supplied a vnet Id/name. Verifying its existence...
138+
Creating new vnet vnetname in resource group PowershellMySqlTest
139+
Creating new subnet Subnetserver00000000 in resource group PowershellMySqlTest and delegating it to Microsoft.DBforMySQL/flexibleServers
140+
Creating MySQL server server00000000 in group PowershellMySqlTest...
141+
Your server server00000000 is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
142+
Creating database flexibleserverdb...
143+
144+
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
145+
---- -------- ------- ------- ------------------ ------- -------------
146+
mysql-test West US 2 Standard_B1ms Burstable admin 5.7 32
147+
148+
```
149+
150+
This cmdlet creates MySql flexible server with vnet id or vnet name provided by a user.
151+
If the virtual network doesn't exist, the cmdlet creates one.
152+
153+
### Example 6: Create a new MySql flexible server with public access to all IPs
154+
```powershell
155+
New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -PublicAccess All
156+
```
157+
158+
```output
159+
Resource group PowershellMySqlTest exists ? : True
160+
Creating MySQL server mysql-test in group PowershellMySqlTest...
161+
Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
162+
Creating database flexibleserverdb...
163+
Configuring server firewall rule to accept connections from 0.0.0.0 to 255.255.255.255
164+
165+
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
166+
---- -------- ------- ------- ------------------ ------- -------------
167+
mysql-test West US 2 Standard_B1ms Burstable admin 5.7 32
168+
```
169+
170+
This cmdlet creates MySql flexible server open to all IP addresses.
171+
172+
### Example 7: Create a new MySql flexible server with firewall
173+
```powershell
174+
New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -PublicAccess 10.10.10.10-10.10.10.12
175+
```
176+
177+
```output
178+
Resource group PowershellMySqlTest exists ? : True
179+
Creating MySQL server mysql-test in group PowershellMySqlTest...
180+
Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
181+
Creating database flexibleserverdb...
182+
Configuring server firewall rule to accept connections from 10.10.10.10 to 10.10.10.12
183+
184+
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
185+
---- -------- ------- ------- ------------------ ------- -------------
186+
mysql-test West US 2 Standard_B1ms Burstable admin 5.7 32
187+
48188
```
49189

50-
{{ Add description here }}
190+
This cmdlet creates MySql flexible server open to specified IP addresses.
51191

52192
## PARAMETERS
53193

src/MySql/MySql.Autorest/docs/New-AzMySqlFlexibleServerFirewallRule.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,44 @@ Creates a new firewall rule for MySQL flexible server
3838

3939
## EXAMPLES
4040

41-
### Example 1: {{ Add title here }}
41+
### Example 1: Create a new MySql server Firewall Rule
4242
```powershell
43-
{{ Add code here }}
43+
New-AzMySqlFlexibleServerFirewallRule -Name firewallrule-test -ResourceGroupName PowershellMySqlTest -ServerName mysql-test -EndIPAddress 0.0.0.1 -StartIPAddress 0.0.0.0
4444
```
4545

4646
```output
47-
{{ Add output here (remove the output block if the example doesn't have an output) }}
47+
Name StartIPAddress EndIPAddress
48+
----------------- -------------- ------------
49+
firewallrule-test 0.0.0.0 0.0.0.1
4850
```
4951

50-
{{ Add description here }}
52+
This cmdlets create a MySql server Firewall Rule.
5153

52-
### Example 2: {{ Add title here }}
54+
### Example 2: Create a new MySql Firewall Rule using -ClientIPAddress.
5355
```powershell
54-
{{ Add code here }}
56+
New-AzMySqlFlexibleServerFirewallRule -ResourceGroupName PowershellMySqlTest -ServerName mysql-test -ClientIPAddress 0.0.0.1
5557
```
5658

5759
```output
58-
{{ Add output here (remove the output block if the example doesn't have an output) }}
60+
Name StartIPAddress EndIPAddress
61+
---- -------------- ------------
62+
ClientIPAddress_2020-08-11_18-19-27 0.0.0.1 0.0.0.1
5963
```
6064

61-
{{ Add description here }}
65+
This cmdlets create a MySql Firewall Rule using -ClientIPAddress.
66+
67+
### Example 3: Create a new MySql Firewall Rule to allow all IPs
68+
```powershell
69+
New-AzMySqlFlexibleServerFirewallRule -ResourceGroupName PowershellMySqlTest -ServerName mysql-test -AllowAll
70+
```
71+
72+
```output
73+
Name StartIPAddress EndIPAddress
74+
---- -------------- ------------
75+
AllowAll_2020-08-11_18-19-27 0.0.0.0 255.255.255.255
76+
```
77+
78+
This cmdlets create a new MySql Firewall Rule to allow all IPs.
6279

6380
## PARAMETERS
6481

src/MySql/MySql.Autorest/docs/New-AzMySqlFlexibleServerReplica.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,32 @@ Creates a new replica from an existing database.
2323

2424
## EXAMPLES
2525

26-
### Example 1: {{ Add title here }}
26+
### Example 1: Create a new MySql server replica
2727
```powershell
28-
{{ Add code here }}
28+
Get-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -ServerName mysql-test | New-AzMySqlFlexibleServerReplica -Replica mysql-test-replica -ResourceGroupName PowershellMySqlTest
2929
```
3030

3131
```output
32-
{{ Add output here (remove the output block if the example doesn't have an output) }}
32+
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
33+
---- -------- ------- ------- ------------------ ------- -------------
34+
mysql-test-replica West US 2 Standard_D2ds_v4 GeneralPurpose admin 5.7 32
3335
```
3436

35-
{{ Add description here }}
37+
This cmdlet creates a new MySql server replica.
3638

37-
### Example 2: {{ Add title here }}
39+
### Example 2: Create a new MySql server replica
3840
```powershell
39-
{{ Add code here }}
41+
$mysql = Get-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -ServerName mysql-test
42+
New-AzMySqlFlexibleServerReplica -Master $mysql -Replica mysql-test-replica -ResourceGroupName PowershellMySqlTest
4043
```
4144

4245
```output
43-
{{ Add output here (remove the output block if the example doesn't have an output) }}
46+
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
47+
---- -------- ------- ------- ------------------ ------- -------------
48+
mysql-test-replica West US 2 Standard_D2ds_v4 GeneralPurpose admin 5.7 32
4449
```
4550

46-
{{ Add description here }}
51+
This cmdlet with parameter master(inputobject) creates a new MySql server replica.
4752

4853
## PARAMETERS
4954

0 commit comments

Comments
 (0)