Skip to content

Commit 444ccbf

Browse files
authored
Fix Microsoft.Insights go/terraform 'full' package (update activityLogAlerts_API.json) (#15163)
* Fix go/terraform package * remove incompatible definitions * Force trigger checks * fix on go package-2021-07 * fix condition
1 parent b186a5f commit 444ccbf

File tree

2 files changed

+53
-10
lines changed

2 files changed

+53
-10
lines changed

specification/monitor/resource-manager/readme.go.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ batch:
3838
- tag: package-2019-06
3939
- tag: package-2019-11
4040
- tag: package-2020-10-only
41-
- tag: package-2021-04
41+
- tag: package-2021-07
4242
```
4343
4444
### Tag: package-2017-09 and go
@@ -113,13 +113,13 @@ Please also specify `--go-sdk-folder=<path to the root directory of your azure-s
113113
output-folder: $(go-sdk-folder)/services/monitor/mgmt/2020-10-01/$(namespace)
114114
```
115115

116-
### Tag: package-2021-04 and go
116+
### Tag: package-2021-07 and go
117117

118-
These settings apply only when `--tag=package-2021-04 --go` is specified on the command line.
118+
These settings apply only when `--tag=package-2021-07 --go` is specified on the command line.
119119
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.
120120

121-
``` yaml $(tag) == 'package-2021-04' && $(go)
122-
output-folder: $(go-sdk-folder)/services/preview/monitor/mgmt/2021-04-01-preview/$(namespace)
121+
``` yaml $(tag) == 'package-2021-07' && $(go)
122+
output-folder: $(go-sdk-folder)/services/preview/monitor/mgmt/2021-07-01-preview/$(namespace)
123123
directive:
124124
- from: activityLogAlerts_API.json
125125
where: $.parameters

specification/monitor/resource-manager/readme.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,38 @@ title: MonitorManagementClient
3535
``` yaml
3636
description: Monitor Management Client
3737
openapi-type: arm
38-
tag: package-2021-04
38+
tag: package-2021-07
39+
```
40+
41+
### Tag: package-2021-07
42+
43+
These settings apply only when `--tag=package-2021-07` is specified on the command line
44+
45+
``` yaml $(tag) == 'package-2021-07'
46+
input-file:
47+
- Microsoft.Insights/stable/2015-04-01/autoscale_API.json
48+
- Microsoft.Insights/stable/2015-04-01/operations_API.json
49+
- Microsoft.Insights/stable/2016-03-01/alertRulesIncidents_API.json
50+
- Microsoft.Insights/stable/2016-03-01/alertRules_API.json
51+
- Microsoft.Insights/stable/2016-03-01/logProfiles_API.json
52+
- Microsoft.Insights/preview/2017-05-01-preview/diagnosticsSettings_API.json
53+
- Microsoft.Insights/preview/2017-05-01-preview/diagnosticsSettingsCategories_API.json
54+
- Microsoft.Insights/stable/2019-06-01/actionGroups_API.json
55+
- Microsoft.Insights/stable/2015-04-01/activityLogs_API.json
56+
- Microsoft.Insights/stable/2015-04-01/eventCategories_API.json
57+
- Microsoft.Insights/stable/2015-04-01/tenantActivityLogs_API.json
58+
- Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json
59+
- Microsoft.Insights/stable/2018-01-01/metrics_API.json
60+
- Microsoft.Insights/stable/2019-03-01/metricBaselines_API.json
61+
- Microsoft.Insights/stable/2018-03-01/metricAlert_API.json
62+
- Microsoft.Insights/stable/2018-04-16/scheduledQueryRule_API.json
63+
- Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json
64+
- Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json
65+
- Microsoft.Insights/preview/2019-10-17-preview/privateLinkScopes_API.json
66+
- Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json
67+
- Microsoft.Insights/stable/2021-04-01/dataCollectionEndpoints_API.json
68+
- Microsoft.Insights/stable/2021-04-01/dataCollectionRuleAssociations_API.json
69+
- Microsoft.Insights/stable/2021-04-01/dataCollectionRules_API.json
3970
```
4071

4172
### Tag: package-2021-04
@@ -756,18 +787,30 @@ directive:
756787
from: autoscale_API.json
757788
where: $.paths
758789
reason: 'Operations API is defined in a separate swagger spec for Microsoft.Insights namespace (https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/operations_API.json)'
759-
790+
760791
```
761792

762-
``` yaml ($(go) && !$(track2)) || $(csharp) || $(validation) || $(typescript)
793+
``` yaml ($(go) && !$(track2) && $(tag) == 'package-2021-07') || $(csharp) || $(validation) || $(typescript)
763794
directive:
764795
- from: activityLogAlerts_API.json
765796
where: $.definitions
766797
transform: delete $["Resource"]
767798
reason: Missing kind, etag
799+
- from: activityLogAlerts_API.json
800+
where: $.definitions
801+
transform: delete $["ErrorResponse"]
802+
reason: Incompatible values (2020-10-01)
803+
- from: activityLogAlerts_API.json
804+
where: $.definitions
805+
transform: delete $["AzureResource"]
806+
reason: Incompatible values (2020-10-01)
807+
- from: activityLogAlerts_API.json
808+
where: $.definitions
809+
transform: delete $["ActionGroup"]
810+
reason: Incompatible values (2020-10-01)
768811
```
769812

770-
``` yaml !$(python) && !$(go) && !$(java) && $(tag) == 'package-2021-04'
813+
``` yaml !$(python) && !$(go) && !$(java) && ($(tag) == 'package-2021-04' || $(tag) == 'package-2021-07')
771814
directive:
772815
- from: scheduledQueryRule_API.json
773816
where: $.parameters
@@ -814,7 +857,7 @@ directive:
814857
### Tag: profile-hybrid-2019-03-01
815858

816859
These settings apply only when `--tag=profile-hybrid-2019-03-01` is specified on the command line.
817-
Creating this tag to pick proper resources from the hybrid profile.
860+
Creating this tag to pick proper resources from the hybrid profile.
818861

819862
``` yaml $(tag) == 'profile-hybrid-2019-03-01'
820863
input-file:

0 commit comments

Comments
 (0)