Skip to content

Commit d886799

Browse files
Release databasewatcher microsoft.database watcher 2024 07 19 preview (#29971)
* Update watcher.tsp * First cut * Fixes * Fixes * New property * Identity * Add examples * Max/min set * Compile fix * Added v5 types * Revert * Examples for rules * Examples * Added api * Added * Comment * Enum * Examples * Nmae change * Examples * Examples * Added required
1 parent 9930174 commit d886799

File tree

48 files changed

+4990
-1
lines changed

Some content is hidden

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

48 files changed

+4990
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import "@typespec/rest";
2+
import "@azure-tools/typespec-azure-core";
3+
import "@azure-tools/typespec-azure-resource-manager";
4+
5+
namespace Microsoft.DatabaseWatcher;
6+
7+
using Azure.ResourceManager;
8+
using TypeSpec.Versioning;
9+
using TypeSpec.Http;
10+
using TypeSpec.Rest;
11+
12+
@armResourceOperations
13+
@added(Versions.v2024_07_19_preview)
14+
interface AlertRuleResources {
15+
get is ArmResourceRead<AlertRuleResource>;
16+
createOrUpdate is ArmResourceCreateOrReplaceSync<AlertRuleResource>;
17+
delete is ArmResourceDeleteSync<AlertRuleResource>;
18+
listByParent is ArmResourceListByParent<AlertRuleResource>;
19+
}
20+
21+
@parentResource(Watcher)
22+
@added(Versions.v2024_07_19_preview)
23+
model AlertRuleResource is ProxyResource<AlertRuleResourceProperties> {
24+
@doc("The alert rule proxy resource name.")
25+
@key("alertRuleResourceName")
26+
@pattern("^[a-zA-Z0-9]{1}[a-zA-Z0-9-_.]{0,62}[a-zA-Z0-9_]{1}$")
27+
@segment("alertRuleResources")
28+
@path
29+
name: string;
30+
}
31+
32+
@doc("The generic properties of the alert rule proxy resource.")
33+
@added(Versions.v2024_07_19_preview)
34+
model AlertRuleResourceProperties {
35+
@doc("The resource ID of the alert rule resource.")
36+
alertRuleResourceId: Azure.Core.armResourceIdentifier<[
37+
{
38+
type: "Microsoft.Insights/scheduledQueryRules";
39+
}
40+
]>;
41+
42+
@doc("The properties with which the alert rule resource was created.")
43+
createdWithProperties: alertRuleCreationProperties;
44+
45+
@doc("The creation time of the alert rule resource.")
46+
creationTime: utcDateTime;
47+
48+
@visibility("read")
49+
@doc("The provisioning state of the alert rule resource.")
50+
provisioningState?: ResourceProvisioningState;
51+
52+
@doc("The template ID associated with alert rule resource.")
53+
alertRuleTemplateId: string;
54+
55+
@doc("The alert rule template version.")
56+
alertRuleTemplateVersion: string;
57+
}
58+
59+
@doc("The properties with which the alert rule resource was created.")
60+
@added(Versions.v2024_07_19_preview)
61+
union alertRuleCreationProperties {
62+
string,
63+
64+
@doc("The alert rule was created with an action group.")
65+
CreatedWithActionGroup: "CreatedWithActionGroup",
66+
67+
@doc("The alert rule was created with no properties.")
68+
None: "None",
69+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"title": "AlertRuleResources_CreateOrUpdate - generated by [MaximumSet] rule",
3+
"operationId": "AlertRuleResources_CreateOrUpdate",
4+
"parameters": {
5+
"api-version": "2024-07-19-preview",
6+
"subscriptionId": "6f53185c-ea09-4fc3-9075-318dec805303",
7+
"resourceGroupName": "rgWatcher",
8+
"watcherName": "testWatcher",
9+
"alertRuleResourceName": "testAlert",
10+
"resource": {
11+
"properties": {
12+
"alertRuleResourceId": "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
13+
"creationTime": "2024-07-25T15:38:47.798Z",
14+
"alertRuleTemplateVersion": "1.0",
15+
"alertRuleTemplateId": "someTemplateId",
16+
"createdWithProperties": "CreatedWithActionGroup"
17+
}
18+
}
19+
},
20+
"responses": {
21+
"200": {
22+
"body": {
23+
"properties": {
24+
"alertRuleResourceId": "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
25+
"creationTime": "2024-07-25T15:38:47.798Z",
26+
"alertRuleTemplateVersion": "1.0",
27+
"alertRuleTemplateId": "someTemplateId",
28+
"createdWithProperties": "CreatedWithActionGroup",
29+
"provisioningState": "Succeeded"
30+
},
31+
"id": "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.databasewatcher/watchers/testWatcher/alertRuleResources/testAlert",
32+
"name": "testAlert",
33+
"type": "microsoft.databasewatcher/watchers/alertRuleResources",
34+
"systemData": {
35+
"createdBy": "enbpvlpqbwd",
36+
"createdByType": "User",
37+
"createdAt": "2024-07-25T15:38:47.092Z",
38+
"lastModifiedBy": "mxp",
39+
"lastModifiedByType": "User",
40+
"lastModifiedAt": "2024-07-25T15:38:47.092Z"
41+
}
42+
}
43+
},
44+
"201": {
45+
"body": {
46+
"properties": {
47+
"alertRuleResourceId": "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
48+
"creationTime": "2024-07-25T15:38:47.798Z",
49+
"alertRuleTemplateVersion": "1.0",
50+
"alertRuleTemplateId": "someTemplateId",
51+
"createdWithProperties": "CreatedWithActionGroup",
52+
"provisioningState": "Succeeded"
53+
},
54+
"id": "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.databasewatcher/watchers/testWatcher/alertRuleResources/testAlert",
55+
"name": "testAlert",
56+
"type": "microsoft.databasewatcher/watchers/alertRuleResources",
57+
"systemData": {
58+
"createdBy": "enbpvlpqbwd",
59+
"createdByType": "User",
60+
"createdAt": "2024-07-25T15:38:47.092Z",
61+
"lastModifiedBy": "mxp",
62+
"lastModifiedByType": "User",
63+
"lastModifiedAt": "2024-07-25T15:38:47.092Z"
64+
}
65+
}
66+
}
67+
}
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"title": "AlertRuleResources_Delete - generated by [MaximumSet] rule",
3+
"operationId": "AlertRuleResources_Delete",
4+
"parameters": {
5+
"api-version": "2024-07-19-preview",
6+
"subscriptionId": "6f53185c-ea09-4fc3-9075-318dec805303",
7+
"resourceGroupName": "rgWatcher",
8+
"watcherName": "testWatcher",
9+
"alertRuleResourceName": "testAlert"
10+
},
11+
"responses": {
12+
"200": {},
13+
"204": {}
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"title": "AlertRuleResources_Get - generated by [MaximumSet] rule",
3+
"operationId": "AlertRuleResources_Get",
4+
"parameters": {
5+
"api-version": "2024-07-19-preview",
6+
"subscriptionId": "6f53185c-ea09-4fc3-9075-318dec805303",
7+
"resourceGroupName": "rgWatcher",
8+
"watcherName": "testWatcher",
9+
"alertRuleResourceName": "testAlert"
10+
},
11+
"responses": {
12+
"200": {
13+
"body": {
14+
"properties": {
15+
"alertRuleResourceId": "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
16+
"creationTime": "2024-07-25T15:38:47.798Z",
17+
"alertRuleTemplateVersion": "1.0",
18+
"alertRuleTemplateId": "someTemplateId",
19+
"createdWithProperties": "CreatedWithActionGroup",
20+
"provisioningState": "Succeeded"
21+
},
22+
"id": "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.databasewatcher/watchers/testWatcher/alertRuleResources/testAlert",
23+
"name": "testAlert",
24+
"type": "microsoft.databasewatcher/watchers/alertRuleResources",
25+
"systemData": {
26+
"createdBy": "enbpvlpqbwd",
27+
"createdByType": "User",
28+
"createdAt": "2024-07-25T15:38:47.092Z",
29+
"lastModifiedBy": "mxp",
30+
"lastModifiedByType": "User",
31+
"lastModifiedAt": "2024-07-25T15:38:47.092Z"
32+
}
33+
}
34+
}
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"title": "AlertRuleResources_ListByParent",
3+
"operationId": "AlertRuleResources_ListByParent",
4+
"parameters": {
5+
"api-version": "2024-07-19-preview",
6+
"subscriptionId": "6f53185c-ea09-4fc3-9075-318dec805303",
7+
"resourceGroupName": "rgWatcher",
8+
"watcherName": "testWatcher"
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"value": [
14+
{
15+
"properties": {
16+
"alertRuleResourceId": "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
17+
"creationTime": "2024-07-25T15:38:47.798Z",
18+
"alertRuleTemplateVersion": "1.0",
19+
"provisioningState": "Succeeded",
20+
"alertRuleTemplateId": "someTemplateId",
21+
"createdWithProperties": "CreatedWithActionGroup"
22+
},
23+
"id": "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.databasewatcher/watchers/testWatcher/alertRuleResources/testAlert",
24+
"name": "testAlert",
25+
"type": "microsoft.databasewatcher/watchers/alertRuleResources",
26+
"systemData": {
27+
"createdBy": "enbpvlpqbwd",
28+
"createdByType": "User",
29+
"createdAt": "2024-07-25T15:38:47.092Z",
30+
"lastModifiedBy": "mxp",
31+
"lastModifiedByType": "User",
32+
"lastModifiedAt": "2024-07-25T15:38:47.092Z"
33+
}
34+
}
35+
],
36+
"nextLink": "https://microsoft.com/a"
37+
}
38+
}
39+
}
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"title": "Operations_List - generated by [MaximumSet] rule",
3+
"operationId": "Operations_List",
4+
"parameters": {
5+
"api-version": "2024-07-19-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"name": "snzrdvltunnrz",
13+
"isDataAction": true,
14+
"display": {
15+
"provider": "dtfrqzamclscchmghtxn",
16+
"resource": "lvlhnsfnquorjuuutjxex",
17+
"operation": "vbgvamoxqwthpbdghxzaw",
18+
"description": "nvbtuwwjfehylzmoatd"
19+
},
20+
"origin": "user",
21+
"actionType": "Internal"
22+
}
23+
],
24+
"nextLink": "https://microsoft.com/awfba"
25+
}
26+
}
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"title": "Operations_List - generated by [MinimumSet] rule",
3+
"operationId": "Operations_List",
4+
"parameters": {
5+
"api-version": "2024-07-19-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {}
10+
}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"title": "SharedPrivateLinkResources_Create - generated by [MaximumSet] rule",
3+
"operationId": "SharedPrivateLinkResources_Create",
4+
"parameters": {
5+
"api-version": "2024-07-19-preview",
6+
"subscriptionId": "6f53185c-ea09-4fc3-9075-318dec805303",
7+
"resourceGroupName": "apiTest-ddat4p",
8+
"watcherName": "databasemo3ej9ih",
9+
"sharedPrivateLinkResourceName": "monitoringh22eed",
10+
"resource": {
11+
"properties": {
12+
"privateLinkResourceId": "/subscriptions/6f53185c-ea09-4fc3-9075-318dec805303/resourceGroups/apiTest-ddat4p/providers/Microsoft.KeyVault/vaults/kvmo3ej9ih",
13+
"groupId": "vault",
14+
"requestMessage": "request message",
15+
"dnsZone": "ec3ae9d410ba",
16+
"status": "Pending"
17+
}
18+
}
19+
},
20+
"responses": {
21+
"200": {
22+
"body": {
23+
"properties": {
24+
"privateLinkResourceId": "/subscriptions/6f53185c-ea09-4fc3-9075-318dec805303/resourceGroups/apiTest-ddat4p/providers/Microsoft.KeyVault/vaults/kvmo3ej9ih",
25+
"groupId": "vault",
26+
"requestMessage": "request message",
27+
"dnsZone": "ec3ae9d410ba",
28+
"status": "Pending",
29+
"provisioningState": "Completed"
30+
},
31+
"id": "/subscriptions/6f53185c-ea09-4fc3-9075-318dec805303/resourceGroups/apiTest-ddat4p/providers/Microsoft.DatabaseWatcher/watchers/databasemo3ej9ih/sharedPrivateLinkResources/monitoringh22eed",
32+
"name": "monitoringh22eed",
33+
"type": "microsoft.databasewatcher/watchers/sharedPrivateLinkResources",
34+
"systemData": {
35+
"createdBy": "enbpvlpqbwd",
36+
"createdByType": "User",
37+
"createdAt": "2024-07-25T15:38:47.092Z",
38+
"lastModifiedBy": "mxp",
39+
"lastModifiedByType": "User",
40+
"lastModifiedAt": "2024-07-25T15:38:47.092Z"
41+
}
42+
}
43+
},
44+
"201": {
45+
"headers": {
46+
"Azure-AsyncOperation": "https://contoso.com/operationstatus"
47+
},
48+
"body": {
49+
"properties": {
50+
"privateLinkResourceId": "/subscriptions/6f53185c-ea09-4fc3-9075-318dec805303/resourceGroups/apiTest-ddat4p/providers/Microsoft.KeyVault/vaults/kvmo3ej9ih",
51+
"groupId": "vault",
52+
"requestMessage": "request message",
53+
"dnsZone": "ec3ae9d410ba",
54+
"status": "Pending",
55+
"provisioningState": "Completed"
56+
},
57+
"id": "/subscriptions/6f53185c-ea09-4fc3-9075-318dec805303/resourceGroups/apiTest-ddat4p/providers/Microsoft.DatabaseWatcher/watchers/databasemo3ej9ih/sharedPrivateLinkResources/monitoringh22eed",
58+
"name": "monitoringh22eed",
59+
"type": "microsoft.databasewatcher/watchers/sharedPrivateLinkResources",
60+
"systemData": {
61+
"createdBy": "enbpvlpqbwd",
62+
"createdByType": "User",
63+
"createdAt": "2024-07-25T15:38:47.092Z",
64+
"lastModifiedBy": "mxp",
65+
"lastModifiedByType": "User",
66+
"lastModifiedAt": "2024-07-25T15:38:47.092Z"
67+
}
68+
}
69+
}
70+
}
71+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"title": "SharedPrivateLinkResources_Delete - generated by [MaximumSet] rule",
3+
"operationId": "SharedPrivateLinkResources_Delete",
4+
"parameters": {
5+
"api-version": "2024-07-19-preview",
6+
"subscriptionId": "6f53185c-ea09-4fc3-9075-318dec805303",
7+
"resourceGroupName": "apiTest-ddat4p",
8+
"watcherName": "databasemo3ej9ih",
9+
"sharedPrivateLinkResourceName": "monitoringh22eed"
10+
},
11+
"responses": {
12+
"202": {
13+
"headers": {
14+
"location": "https://contoso.com/operationstatus"
15+
}
16+
},
17+
"204": {}
18+
}
19+
}

0 commit comments

Comments
 (0)