Skip to content

Commit

Permalink
Fix sample generation, generate samples (#2363)
Browse files Browse the repository at this point in the history
* Update types from https://github.com/Azure/azure-rest-api-specs/tree/1ceae653a

* Fix sample generation

---------

Co-authored-by: anthony-c-martin <[email protected]>
  • Loading branch information
anthony-c-martin and anthony-c-martin authored Nov 21, 2024
1 parent 0f159f6 commit 6dfeafc
Show file tree
Hide file tree
Showing 1,699 changed files with 775,838 additions and 70 deletions.
15 changes: 15 additions & 0 deletions generated/advisor/microsoft.advisor/2016-07-12-preview/samples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Microsoft.Advisor

## microsoft.advisor/recommendations/suppressions

CreateSuppression
```bicep
resource exampleResource 'Microsoft.Advisor/recommendations/suppressions@2016-07-12-preview' = {
parent: parentResource
name: 'example'
name: 'suppressionName1'
type: 'Microsoft.Advisor/suppressions'
id: '/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId/suppressions/suppressionName1'
ttl: '07:00:00:00'
}
```
14 changes: 14 additions & 0 deletions generated/advisor/microsoft.advisor/2017-03-31/samples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Microsoft.Advisor

## microsoft.advisor/recommendations/suppressions

CreateSuppression
```bicep
resource exampleResource 'Microsoft.Advisor/recommendations/suppressions@2017-03-31' = {
parent: parentResource
name: 'example'
properties: {
ttl: '07:00:00:00'
}
}
```
14 changes: 14 additions & 0 deletions generated/advisor/microsoft.advisor/2017-04-19/samples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Microsoft.Advisor

## microsoft.advisor/recommendations/suppressions

CreateSuppression
```bicep
resource exampleResource 'Microsoft.Advisor/recommendations/suppressions@2017-04-19' = {
parent: parentResource
name: 'example'
properties: {
ttl: '07:00:00:00'
}
}
```
43 changes: 43 additions & 0 deletions generated/advisor/microsoft.advisor/2020-01-01/samples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Microsoft.Advisor

## microsoft.advisor/configurations

PutConfigurations
```bicep
resource exampleResource 'Microsoft.Advisor/configurations@2020-01-01' = {
name: 'example'
properties: {
digests: [
{
name: 'digestConfigName'
actionGroupResourceId: '/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName'
categories: [
'HighAvailability'
'Security'
'Performance'
'Cost'
'OperationalExcellence'
]
frequency: 30
state: 'Active'
language: 'en'
}
]
exclude: true
lowCpuThreshold: '5'
}
}
```

## microsoft.advisor/recommendations/suppressions

CreateSuppression
```bicep
resource exampleResource 'Microsoft.Advisor/recommendations/suppressions@2020-01-01' = {
parent: parentResource
name: 'example'
properties: {
ttl: '07:00:00:00'
}
}
```
44 changes: 44 additions & 0 deletions generated/advisor/microsoft.advisor/2022-09-01/samples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Microsoft.Advisor

## microsoft.advisor/configurations

PutConfigurations
```bicep
resource exampleResource 'Microsoft.Advisor/configurations@2022-09-01' = {
name: 'example'
properties: {
digests: [
{
name: 'digestConfigName'
actionGroupResourceId: '/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName'
categories: [
'HighAvailability'
'Security'
'Performance'
'Cost'
'OperationalExcellence'
]
frequency: 30
state: 'Active'
language: 'en'
}
]
duration: '7'
exclude: true
lowCpuThreshold: '5'
}
}
```

## microsoft.advisor/recommendations/suppressions

CreateSuppression
```bicep
resource exampleResource 'Microsoft.Advisor/recommendations/suppressions@2022-09-01' = {
parent: parentResource
name: 'example'
properties: {
ttl: '07:00:00:00'
}
}
```
44 changes: 44 additions & 0 deletions generated/advisor/microsoft.advisor/2022-10-01/samples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Microsoft.Advisor

## microsoft.advisor/configurations

PutConfigurations
```bicep
resource exampleResource 'Microsoft.Advisor/configurations@2022-10-01' = {
name: 'example'
properties: {
digests: [
{
name: 'digestConfigName'
actionGroupResourceId: '/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName'
categories: [
'HighAvailability'
'Security'
'Performance'
'Cost'
'OperationalExcellence'
]
frequency: 30
state: 'Active'
language: 'en'
}
]
duration: '7'
exclude: true
lowCpuThreshold: '5'
}
}
```

## microsoft.advisor/recommendations/suppressions

CreateSuppression
```bicep
resource exampleResource 'Microsoft.Advisor/recommendations/suppressions@2022-10-01' = {
parent: parentResource
name: 'example'
properties: {
ttl: '07:00:00:00'
}
}
```
44 changes: 44 additions & 0 deletions generated/advisor/microsoft.advisor/2023-01-01/samples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Microsoft.Advisor

## microsoft.advisor/configurations

PutConfigurations
```bicep
resource exampleResource 'Microsoft.Advisor/configurations@2023-01-01' = {
name: 'example'
properties: {
digests: [
{
name: 'digestConfigName'
actionGroupResourceId: '/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName'
categories: [
'HighAvailability'
'Security'
'Performance'
'Cost'
'OperationalExcellence'
]
frequency: 30
state: 'Active'
language: 'en'
}
]
duration: '7'
exclude: true
lowCpuThreshold: '5'
}
}
```

## microsoft.advisor/recommendations/suppressions

CreateSuppression
```bicep
resource exampleResource 'Microsoft.Advisor/recommendations/suppressions@2023-01-01' = {
parent: parentResource
name: 'example'
properties: {
ttl: '07:00:00:00'
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# microsoft.alertsManagement

## microsoft.alertsmanagement/smartdetectoralertrules

Create or update a Smart Detector alert rule
```bicep
resource exampleResource 'microsoft.alertsManagement/smartDetectorAlertRules@2019-03-01' = {
name: 'example'
properties: {
description: 'Sample smart detector alert rule description'
actionGroups: {
customEmailSubject: 'My custom email subject'
customWebhookPayload: '{"AlertRuleName":"#alertrulename"}'
groupIds: [
'/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup'
]
}
detector: {
id: 'VMMemoryLeak'
}
frequency: 'PT5M'
scope: [
'/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1'
]
severity: 'Sev3'
state: 'Enabled'
throttling: {
duration: 'PT20M'
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Microsoft.AlertsManagement

## microsoft.alertsmanagement/actionrules

PutActionRule
```bicep
resource exampleResource 'Microsoft.AlertsManagement/actionRules@2019-05-05-preview' = {
name: 'example'
location: 'Global'
properties: {
type: 'Suppression'
description: 'Action rule on resource group for daily suppression'
conditions: {
monitorCondition: {
operator: 'Equals'
values: [
'Fired'
]
}
monitorService: {
operator: 'Equals'
values: [
'Platform'
'Application Insights'
]
}
severity: {
operator: 'Equals'
values: [
'Sev0'
'Sev2'
]
}
targetResourceType: {
operator: 'NotEquals'
values: [
'Microsoft.Compute/VirtualMachines'
]
}
}
scope: {
scopeType: 'ResourceGroup'
values: [
'/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg'
]
}
status: 'Enabled'
suppressionConfig: {
recurrenceType: 'Daily'
schedule: {
endDate: '12/18/2018'
endTime: '14:00:00'
startDate: '12/09/2018'
startTime: '06:00:00'
}
}
}
tags: {
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# microsoft.alertsManagement

## microsoft.alertsmanagement/smartdetectoralertrules

Create or update a Smart Detector alert rule
```bicep
resource exampleResource 'microsoft.alertsManagement/smartDetectorAlertRules@2019-06-01' = {
name: 'example'
properties: {
description: 'Sample smart detector alert rule description'
actionGroups: {
customEmailSubject: 'My custom email subject'
customWebhookPayload: '{"AlertRuleName":"#alertrulename"}'
groupIds: [
'/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup'
]
}
detector: {
id: 'VMMemoryLeak'
}
frequency: 'PT5M'
scope: [
'/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1'
]
severity: 'Sev3'
state: 'Enabled'
throttling: {
duration: 'PT20M'
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# microsoft.alertsManagement

## microsoft.alertsmanagement/smartdetectoralertrules

Create or update a Smart Detector alert rule
```bicep
resource exampleResource 'microsoft.alertsManagement/smartDetectorAlertRules@2021-04-01' = {
name: 'example'
properties: {
description: 'Sample smart detector alert rule description'
actionGroups: {
customEmailSubject: 'My custom email subject'
customWebhookPayload: '{"AlertRuleName":"#alertrulename"}'
groupIds: [
'/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup'
]
}
detector: {
id: 'VMMemoryLeak'
}
frequency: 'PT5M'
scope: [
'/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1'
]
severity: 'Sev3'
state: 'Enabled'
throttling: {
duration: 'PT20M'
}
}
}
```
Loading

0 comments on commit 6dfeafc

Please sign in to comment.