Skip to content

Commit c4369a7

Browse files
committed
migrate DiagnosticSetting module to autorest v4
1 parent 531182e commit c4369a7

File tree

47 files changed

+1945
-189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1945
-189
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
// Unless required by applicable law or agreed to in writing, software
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
8+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
// See the License for the specific language governing permissions and
10+
// limitations under the License.
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
13+
14+
using System;
15+
using System.Reflection;
16+
using System.Runtime.CompilerServices;
17+
using System.Runtime.InteropServices;
18+
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - DiagnosticSetting")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("6.0.2")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("6.0.2")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]
27+
28+

src/Monitor/DiagnosticSetting.Autorest/README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@ title: DiagnosticSetting
4242
module-version: 0.1.0
4343
subject-prefix: DiagnosticSetting
4444
namespace: Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting
45-
nested-object-to-string: true
46-
47-
# If there are post APIs for some kinds of actions in the RP, you may need to
48-
# uncomment following line to support viaIdentity for these post APIs
49-
# identity-correction-for-post: true
50-
51-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
52-
use-extension:
53-
"@autorest/powershell": "3.x"
5445

5546
directive:
5647
# Following is two common directive which are normally required in all the RPs
@@ -79,7 +70,7 @@ directive:
7970
subject-prefix: ""
8071

8172
- model-cmdlet:
82-
- MetricSettings
83-
- LogSettings
84-
- SubscriptionLogSettings
73+
- model-name: MetricSettings
74+
- model-name: LogSettings
75+
- model-name: SubscriptionLogSettings
8576
```

src/Monitor/DiagnosticSetting.Autorest/custom/autogen-model-cmdlets/New-AzDiagnosticSettingLogSettingsObject.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ Create an in-memory object for LogSettings.
2121
Create an in-memory object for LogSettings.
2222
2323
.Outputs
24-
Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.LogSettings
24+
Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.LogSettings
2525
.Link
26-
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzDiagnosticSettingLogSettingsObject
26+
https://learn.microsoft.com/powershell/module/Az.Monitor/new-azdiagnosticsettinglogsettingsobject
2727
#>
2828
function New-AzDiagnosticSettingLogSettingsObject {
29-
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.LogSettings')]
29+
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.ModelCmdletAttribute()]
30+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.LogSettings')]
3031
[CmdletBinding(PositionalBinding=$false)]
3132
Param(
3233

@@ -48,7 +49,7 @@ function New-AzDiagnosticSettingLogSettingsObject {
4849
)
4950

5051
process {
51-
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.LogSettings]::New()
52+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.LogSettings]::New()
5253

5354
if ($PSBoundParameters.ContainsKey('Category')) {
5455
$Object.Category = $Category

src/Monitor/DiagnosticSetting.Autorest/custom/autogen-model-cmdlets/New-AzDiagnosticSettingMetricSettingsObject.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ Create an in-memory object for MetricSettings.
2121
Create an in-memory object for MetricSettings.
2222
2323
.Outputs
24-
Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.MetricSettings
24+
Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.MetricSettings
2525
.Link
26-
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzDiagnosticSettingMetricSettingsObject
26+
https://learn.microsoft.com/powershell/module/Az.Monitor/new-azdiagnosticsettingmetricsettingsobject
2727
#>
2828
function New-AzDiagnosticSettingMetricSettingsObject {
29-
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.MetricSettings')]
29+
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.ModelCmdletAttribute()]
30+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.MetricSettings')]
3031
[CmdletBinding(PositionalBinding=$false)]
3132
Param(
3233

@@ -48,7 +49,7 @@ function New-AzDiagnosticSettingMetricSettingsObject {
4849
)
4950

5051
process {
51-
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.MetricSettings]::New()
52+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.MetricSettings]::New()
5253

5354
if ($PSBoundParameters.ContainsKey('Category')) {
5455
$Object.Category = $Category

src/Monitor/DiagnosticSetting.Autorest/custom/autogen-model-cmdlets/New-AzDiagnosticSettingSubscriptionLogSettingsObject.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ Create an in-memory object for SubscriptionLogSettings.
2121
Create an in-memory object for SubscriptionLogSettings.
2222
2323
.Outputs
24-
Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.SubscriptionLogSettings
24+
Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.SubscriptionLogSettings
2525
.Link
26-
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzDiagnosticSettingSubscriptionLogSettingsObject
26+
https://learn.microsoft.com/powershell/module/Az.Monitor/new-azdiagnosticsettingsubscriptionlogsettingsobject
2727
#>
2828
function New-AzDiagnosticSettingSubscriptionLogSettingsObject {
29-
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.SubscriptionLogSettings')]
29+
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.ModelCmdletAttribute()]
30+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.SubscriptionLogSettings')]
3031
[CmdletBinding(PositionalBinding=$false)]
3132
Param(
3233

@@ -42,7 +43,7 @@ function New-AzDiagnosticSettingSubscriptionLogSettingsObject {
4243
)
4344

4445
process {
45-
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.SubscriptionLogSettings]::New()
46+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.SubscriptionLogSettings]::New()
4647

4748
if ($PSBoundParameters.ContainsKey('Category')) {
4849
$Object.Category = $Category

src/Monitor/DiagnosticSetting.Autorest/docs/Az.DiagnosticSetting.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.DiagnosticSetting
3-
Module Guid: 58f9f986-1839-4efb-baf4-5ba95f2726bd
3+
Module Guid: 6210decd-f3c4-4cdf-87d4-f4bca61bf471
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.diagnosticsetting
55
Help Version: 1.0.0.0
66
Locale: en-US
@@ -25,7 +25,7 @@ The current list includes the following: Administrative, Security, ServiceHealth
2525
Gets the active subscription diagnostic settings for the specified resource.
2626

2727
### [New-AzDiagnosticSetting](New-AzDiagnosticSetting.md)
28-
Creates or updates diagnostic settings for the specified resource.
28+
Create diagnostic settings for the specified resource.
2929

3030
### [New-AzDiagnosticSettingLogSettingsObject](New-AzDiagnosticSettingLogSettingsObject.md)
3131
Create an in-memory object for LogSettings.
@@ -37,11 +37,17 @@ Create an in-memory object for MetricSettings.
3737
Create an in-memory object for SubscriptionLogSettings.
3838

3939
### [New-AzSubscriptionDiagnosticSetting](New-AzSubscriptionDiagnosticSetting.md)
40-
Creates or updates subscription diagnostic settings for the specified resource.
40+
Create subscription diagnostic settings for the specified resource.
4141

4242
### [Remove-AzDiagnosticSetting](Remove-AzDiagnosticSetting.md)
4343
Deletes existing diagnostic settings for the specified resource.
4444

4545
### [Remove-AzSubscriptionDiagnosticSetting](Remove-AzSubscriptionDiagnosticSetting.md)
4646
Deletes existing subscription diagnostic settings for the specified resource.
4747

48+
### [Update-AzDiagnosticSetting](Update-AzDiagnosticSetting.md)
49+
Update diagnostic settings for the specified resource.
50+
51+
### [Update-AzSubscriptionDiagnosticSetting](Update-AzSubscriptionDiagnosticSetting.md)
52+
Update subscription diagnostic settings for the specified resource.
53+

src/Monitor/DiagnosticSetting.Autorest/docs/Get-AzDiagnosticSetting.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ Accept wildcard characters: False
6969
7070
### -InputObject
7171
Identity Parameter
72-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7372
7473
```yaml
7574
Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.IDiagnosticSettingIdentity
@@ -122,7 +121,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
122121
123122
## OUTPUTS
124123
125-
### Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.IDiagnosticSettingsResource
124+
### Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.IDiagnosticSettingsResource
126125
127126
## NOTES
128127

src/Monitor/DiagnosticSetting.Autorest/docs/Get-AzDiagnosticSettingCategory.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ Accept wildcard characters: False
6262
6363
### -InputObject
6464
Identity Parameter
65-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
6665
6766
```yaml
6867
Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.IDiagnosticSettingIdentity
@@ -115,7 +114,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
115114
116115
## OUTPUTS
117116
118-
### Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.IDiagnosticSettingsCategoryResource
117+
### Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.IDiagnosticSettingsCategoryResource
119118
120119
## NOTES
121120

src/Monitor/DiagnosticSetting.Autorest/docs/Get-AzEventCategory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
6868
6969
## OUTPUTS
7070
71-
### Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20150401.ILocalizableString
71+
### Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.ILocalizableString
7272
7373
## NOTES
7474

src/Monitor/DiagnosticSetting.Autorest/docs/Get-AzSubscriptionDiagnosticSetting.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ Accept wildcard characters: False
6969
7070
### -InputObject
7171
Identity Parameter
72-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7372
7473
```yaml
7574
Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.IDiagnosticSettingIdentity
@@ -122,7 +121,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
122121
123122
## OUTPUTS
124123
125-
### Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.ISubscriptionDiagnosticSettingsResource
124+
### Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.ISubscriptionDiagnosticSettingsResource
126125
127126
## NOTES
128127

0 commit comments

Comments
 (0)