Skip to content

Commit d188022

Browse files
committed
Update Help Files
1 parent 3c204b6 commit d188022

5 files changed

+133
-36
lines changed

src/Sql/Sql/DataClassification/Cmdlet/SetAzSqlDatabaseSensitivityClassification.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,10 @@ protected override DataClassificationAdapter InitModelAdapter()
127127
{
128128
return new DataClassificationAdapter(DefaultProfile.DefaultContext);
129129
}
130+
131+
protected override bool WriteResult()
132+
{
133+
return PassThru;
134+
}
130135
}
131136
}

src/Sql/Sql/DataClassification/Cmdlet/SetAzSqlInstanceDatabaseSensitivityClassification.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Microsoft.Azure.Commands.Sql.Common;
33
using Microsoft.Azure.Commands.Sql.DataClassification.Model;
44
using Microsoft.Azure.Commands.Sql.DataClassification.Services;
5-
using System;
65
using System.Collections.Generic;
76
using System.Management.Automation;
87

@@ -122,7 +121,12 @@ protected override ManagedDatabaseSensitivityClassificationModel GetEntity()
122121

123122
protected override DataClassificationAdapter InitModelAdapter()
124123
{
125-
throw new NotImplementedException();
124+
return new DataClassificationAdapter(DefaultProfile.DefaultContext);
125+
}
126+
127+
protected override bool WriteResult()
128+
{
129+
return PassThru;
126130
}
127131
}
128132
}

src/Sql/Sql/DataClassification/DefinitionsCommon.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class DefinitionsCommon
2222
internal const string SqlDatabaseInputObjectHelpMessage = "The SQL database object.";
2323
internal const string ManagedDatabaseInputObjectHelpMessage = "The SQL instance database object.";
2424
internal const string SqlDatabaseSensitivityClassificationInputObjectHelpMessage = "An object representing a SQL Database Sensitivity Classification.";
25-
internal const string ManagedDatabaseSensitivityClassificationInputObjectHelpMessage = "An object representing a SQL Managed Database Sensitivity Classification.";
25+
internal const string ManagedDatabaseSensitivityClassificationInputObjectHelpMessage = "An object representing a SQL Managed Instance Database Sensitivity Classification.";
2626
internal const string PassThruHelpMessage = "Specifies whether to output the sensitivity classification model at end of cmdlet execution";
2727
internal const string AsJobHelpMessage = "Run cmdlet in the background";
2828
internal const string SchemaNameHelpMessage = "Name of schema.";

src/Sql/Sql/help/Set-AzSqlDatabaseSensitivityClassification.md

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,56 @@ schema: 2.0.0
99
# Set-AzSqlDatabaseSensitivityClassification
1010

1111
## SYNOPSIS
12+
Sets the sensitivity labels and information types of columns in the database.
1213

1314
## SYNTAX
1415

1516
### ColumnParameterSet
1617
```
1718
Set-AzSqlDatabaseSensitivityClassification [-ResourceGroupName] <String> [-ServerName] <String>
1819
[-DatabaseName] <String> -SchemaName <String> -TableName <String> -ColumnName <String> [-LabelName <String>]
19-
[-InformationType <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
20-
[<CommonParameters>]
20+
[-InformationType <String>] [-PassThru] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
21+
[-Confirm] [<CommonParameters>]
2122
```
2223

2324
### ParentResourceParameterSet
2425
```
25-
Set-AzSqlDatabaseSensitivityClassification -InputObject <SqlDatabaseSensitivityClassificationModel>
26-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
26+
Set-AzSqlDatabaseSensitivityClassification -InputObject <SqlDatabaseSensitivityClassificationModel> [-PassThru]
27+
[-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2728
```
2829

2930
## DESCRIPTION
31+
The Set-AzSqlDatabaseSensitivityClassification cmdlet sets the sensitivity labels and information types of columns in the database.
3032

3133
## EXAMPLES
3234

35+
### Example 1: Set sensitivity classification of a column in an Azure SQL database.
36+
```powershell
37+
PS C:\> Set-AzSqlDatabaseSensitivityClassification -ResourceGroupName resourceGroup -ServerName server -DatabaseName database -SchemaName schema -TableName table -ColumnName column -InformationType informationType -LabelName label
38+
```
39+
40+
### Example 2: Set recommended sensitivity classification of columns in an Azure SQL database.
41+
```powershell
42+
PS C:\> Get-AzSqlDatabaseSensitivityRecommendations -ResourceGroupName resourceGroup -ServerName server -DatabaseName database | Set-AzSqlDatabaseSensitivityClassification
43+
```
44+
3345
## PARAMETERS
3446

47+
### -AsJob
48+
Run cmdlet in the background
49+
50+
```yaml
51+
Type: System.Management.Automation.SwitchParameter
52+
Parameter Sets: (All)
53+
Aliases:
54+
55+
Required: False
56+
Position: Named
57+
Default value: None
58+
Accept pipeline input: False
59+
Accept wildcard characters: False
60+
```
61+
3562
### -ColumnName
3663
Name of column.
3764
@@ -48,7 +75,7 @@ Accept wildcard characters: False
4875
```
4976
5077
### -DatabaseName
51-
SQL Database name.
78+
The name of the Azure SQL Database.
5279
5380
```yaml
5481
Type: System.String
@@ -78,7 +105,7 @@ Accept wildcard characters: False
78105
```
79106
80107
### -InformationType
81-
A name that describes the information type of the data stored in the column.
108+
A name that describes the information type of the data stored in the column.
82109
83110
```yaml
84111
Type: System.String
@@ -93,7 +120,7 @@ Accept wildcard characters: False
93120
```
94121
95122
### -InputObject
96-
An object representing a SQL Database Sensitivity Classification
123+
An object representing a SQL Database Sensitivity Classification.
97124
98125
```yaml
99126
Type: Microsoft.Azure.Commands.Sql.DataClassification.Model.SqlDatabaseSensitivityClassificationModel
@@ -108,7 +135,7 @@ Accept wildcard characters: False
108135
```
109136
110137
### -LabelName
111-
A name that describes the sensitivity of the data stored in the column.
138+
A name that describes the sensitivity of the data stored in the column.
112139
113140
```yaml
114141
Type: System.String
@@ -122,6 +149,21 @@ Accept pipeline input: True (ByPropertyName)
122149
Accept wildcard characters: False
123150
```
124151
152+
### -PassThru
153+
Specifies whether to output the sensitivity classification model at end of cmdlet execution
154+
155+
```yaml
156+
Type: System.Management.Automation.SwitchParameter
157+
Parameter Sets: (All)
158+
Aliases:
159+
160+
Required: False
161+
Position: Named
162+
Default value: None
163+
Accept pipeline input: False
164+
Accept wildcard characters: False
165+
```
166+
125167
### -ResourceGroupName
126168
The name of the resource group.
127169
@@ -217,6 +259,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
217259
218260
## INPUTS
219261
262+
### Microsoft.Azure.Commands.Sql.DataClassification.Model.SqlDatabaseSensitivityClassificationModel
263+
220264
## OUTPUTS
221265
222266
## NOTES

src/Sql/Sql/help/Set-AzSqlInstanceDatabaseSensitivityClassification.md

Lines changed: 69 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,63 @@
22
external help file: Microsoft.Azure.PowerShell.Cmdlets.Sql.dll-Help.xml
33
Module Name: Az.Sql
44
ms.assetid: 14814BF3-51AF-4E51-A8A6-661825BD88D1
5-
online version: https://docs.microsoft.com/en-us/powershell/module/az.sql/set-azmanageddatabasesensitivityclassification
5+
online version: https://docs.microsoft.com/en-us/powershell/module/az.sql/get-azsqlinstancedatabasesensitivityclassification
66
schema: 2.0.0
77
---
88

9-
# Set-AzManagedDatabaseSensitivityClassification
9+
# Set-AzSqlInstanceDatabaseSensitivityClassification
1010

1111
## SYNOPSIS
12+
Sets the sensitivity labels and information types of columns in the database.
1213

1314
## SYNTAX
1415

1516
### ColumnParameterSet
1617
```
17-
Set-AzSqlDatabaseSensitivityClassification [-ResourceGroupName] <String> [-ServerName] <String>
18+
Set-AzSqlInstanceDatabaseSensitivityClassification [-ResourceGroupName] <String> [-InstanceName] <String>
1819
[-DatabaseName] <String> -SchemaName <String> -TableName <String> -ColumnName <String> [-LabelName <String>]
19-
[-InformationType <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
20-
[<CommonParameters>]
20+
[-InformationType <String>] [-PassThru] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
21+
[-Confirm] [<CommonParameters>]
2122
```
2223

2324
### ParentResourceParameterSet
2425
```
25-
Set-AzSqlDatabaseSensitivityClassification -InputObject <SqlDatabaseSensitivityClassificationModel>
26-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
26+
Set-AzSqlInstanceDatabaseSensitivityClassification -InputObject <ManagedDatabaseSensitivityClassificationModel>
27+
[-PassThru] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2728
```
2829

2930
## DESCRIPTION
31+
The Set-AzSqlInstanceDatabaseSensitivityClassification cmdlet sets the sensitivity labels and information types of columns in the database.
3032

3133
## EXAMPLES
3234

35+
### Example 1: Set sensitivity classification of a column in an Azure SQL Managed Instance database.
36+
```powershell
37+
PS C:\> Set-AzSqlInstanceDatabaseSensitivityClassification -ResourceGroupName resourceGroup -InstanceName managedInstance -DatabaseName database -SchemaName schema -TableName table -ColumnName column -InformationType informationType -LabelName label
38+
```
39+
40+
### Example 2: Set recommended sensitivity classification of columns in an Azure SQL Managed Instance database.
41+
```powershell
42+
PS C:\> Get-AzSqlInstanceDatabaseSensitivityRecommendations -ResourceGroupName resourceGroup -InstanceName managedInstance -DatabaseName database | Set-AzSqlInstanceDatabaseSensitivityClassification
43+
```
44+
3345
## PARAMETERS
3446

47+
### -AsJob
48+
Run cmdlet in the background
49+
50+
```yaml
51+
Type: System.Management.Automation.SwitchParameter
52+
Parameter Sets: (All)
53+
Aliases:
54+
55+
Required: False
56+
Position: Named
57+
Default value: None
58+
Accept pipeline input: False
59+
Accept wildcard characters: False
60+
```
61+
3562
### -ColumnName
3663
Name of column.
3764
@@ -48,7 +75,7 @@ Accept wildcard characters: False
4875
```
4976
5077
### -DatabaseName
51-
SQL Database name.
78+
The name of the Azure SQL Instance Database.
5279
5380
```yaml
5481
Type: System.String
@@ -78,7 +105,7 @@ Accept wildcard characters: False
78105
```
79106
80107
### -InformationType
81-
A name that describes the information type of the data stored in the column.
108+
A name that describes the information type of the data stored in the column.
82109
83110
```yaml
84111
Type: System.String
@@ -93,10 +120,10 @@ Accept wildcard characters: False
93120
```
94121
95122
### -InputObject
96-
An object representing a SQL Database Sensitivity Classification
123+
The SQL instance database object.
97124
98125
```yaml
99-
Type: Microsoft.Azure.Commands.Sql.DataClassification.Model.SqlDatabaseSensitivityClassificationModel
126+
Type: Microsoft.Azure.Commands.Sql.DataClassification.Model.ManagedDatabaseSensitivityClassificationModel
100127
Parameter Sets: ParentResourceParameterSet
101128
Aliases:
102129

@@ -107,61 +134,76 @@ Accept pipeline input: True (ByValue)
107134
Accept wildcard characters: False
108135
```
109136
110-
### -LabelName
111-
A name that describes the sensitivity of the data stored in the column.
137+
### -InstanceName
138+
SQL Managed Instance name.
112139
113140
```yaml
114141
Type: System.String
115142
Parameter Sets: ColumnParameterSet
116143
Aliases:
117144

118-
Required: False
119-
Position: Named
145+
Required: True
146+
Position: 1
120147
Default value: None
121148
Accept pipeline input: True (ByPropertyName)
122149
Accept wildcard characters: False
123150
```
124151
125-
### -ResourceGroupName
126-
The name of the resource group.
152+
### -LabelName
153+
A name that describes the sensitivity of the data stored in the column.
127154
128155
```yaml
129156
Type: System.String
130157
Parameter Sets: ColumnParameterSet
131158
Aliases:
132159

133-
Required: True
134-
Position: 0
160+
Required: False
161+
Position: Named
135162
Default value: None
136163
Accept pipeline input: True (ByPropertyName)
137164
Accept wildcard characters: False
138165
```
139166
140-
### -SchemaName
141-
Name of schema.
167+
### -PassThru
168+
Specifies whether to output the sensitivity classification model at end of cmdlet execution
169+
170+
```yaml
171+
Type: System.Management.Automation.SwitchParameter
172+
Parameter Sets: (All)
173+
Aliases:
174+
175+
Required: False
176+
Position: Named
177+
Default value: None
178+
Accept pipeline input: False
179+
Accept wildcard characters: False
180+
```
181+
182+
### -ResourceGroupName
183+
The name of the resource group.
142184
143185
```yaml
144186
Type: System.String
145187
Parameter Sets: ColumnParameterSet
146188
Aliases:
147189

148190
Required: True
149-
Position: Named
191+
Position: 0
150192
Default value: None
151193
Accept pipeline input: True (ByPropertyName)
152194
Accept wildcard characters: False
153195
```
154196
155-
### -ServerName
156-
SQL server name.
197+
### -SchemaName
198+
Name of schema.
157199
158200
```yaml
159201
Type: System.String
160202
Parameter Sets: ColumnParameterSet
161203
Aliases:
162204

163205
Required: True
164-
Position: 1
206+
Position: Named
165207
Default value: None
166208
Accept pipeline input: True (ByPropertyName)
167209
Accept wildcard characters: False
@@ -217,6 +259,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
217259
218260
## INPUTS
219261
262+
### Microsoft.Azure.Commands.Sql.DataClassification.Model.ManagedDatabaseSensitivityClassificationModel
263+
220264
## OUTPUTS
221265
222266
## NOTES

0 commit comments

Comments
 (0)