forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Stable Version changes for Saved Query API (Azure#29094)
* Added saved query to a stable version * Fixed the lint errors * Fixed the semantic and lint errors * Added example for 201 * Removued unused example * Prettier check updated * Added previous stable version api's as well * added changes for previous stable version for graph query * Added top level subscription id changes and added a new api which will fetch all the saved queries from subscription id * Added swagger prettier checks
- Loading branch information
1 parent
5ad210f
commit f00bed5
Showing
19 changed files
with
2,091 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...ph/resource-manager/Microsoft.ResourceGraph/stable/2019-04-01/examples/GraphQueryAdd.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"title": "Create a saved query", | ||
"description": "Create new saved query resource.", | ||
"parameters": { | ||
"subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", | ||
"resourceGroupName": "my-resource-group", | ||
"resourceName": "MyDockerVMs", | ||
"api-version": "2019-04-01", | ||
"properties": { | ||
"tags": {}, | ||
"properties": { | ||
"description": "Docker VMs in PROD", | ||
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", | ||
"name": "MyDockerVMs", | ||
"type": "Microsoft.ResourceGraph/queries", | ||
"etag": "5d64408e-4ca3-41f7-b725-6914f3012afa", | ||
"tags": {}, | ||
"properties": { | ||
"description": "Docker VMs in PROD", | ||
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", | ||
"resultKind": "basic", | ||
"timeModified": "2019-03-12T13:51:13-07:00" | ||
} | ||
} | ||
}, | ||
"201": { | ||
"body": { | ||
"id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", | ||
"name": "MyDockerVMs", | ||
"type": "Microsoft.ResourceGraph/queries", | ||
"etag": "5d64408e-4ca3-41f7-b725-6914f3012afa", | ||
"tags": {}, | ||
"properties": { | ||
"description": "Docker VMs in PROD", | ||
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", | ||
"resultKind": "basic", | ||
"timeModified": "2019-03-12T13:51:13-07:00" | ||
} | ||
} | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...resource-manager/Microsoft.ResourceGraph/stable/2019-04-01/examples/GraphQueryDelete.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"title": "Delete a saved query", | ||
"description": "Delete a saved query resource by subid, resource group, and resource name.", | ||
"parameters": { | ||
"subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", | ||
"resourceGroupName": "my-resource-group", | ||
"resourceName": "MyDockerVM", | ||
"api-version": "2019-04-01" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"204": {} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...ph/resource-manager/Microsoft.ResourceGraph/stable/2019-04-01/examples/GraphQueryGet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"title": "Get a saved query", | ||
"description": "Get a saved query resource by subid, resource group, and resource name.", | ||
"parameters": { | ||
"subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", | ||
"resourceGroupName": "my-resource-group", | ||
"resourceName": "MyDockerVMs", | ||
"api-version": "2019-04-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", | ||
"name": "MyDockerVMs", | ||
"type": "Microsoft.ResourceGraph/queries", | ||
"etag": "5d64408e-4ca3-41f7-b725-6914f3012afa", | ||
"tags": null, | ||
"properties": { | ||
"description": "Docker VMs in PROD", | ||
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", | ||
"resultKind": "basic", | ||
"timeModified": "2019-03-12T13:51:13-07:00" | ||
} | ||
} | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...h/resource-manager/Microsoft.ResourceGraph/stable/2019-04-01/examples/GraphQueryList.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"title": "Get a list of saved queries", | ||
"description": "Get a list of saved queries within subscription id and resource group.", | ||
"parameters": { | ||
"subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", | ||
"resourceGroupName": "my-resource-group", | ||
"api-version": "2019-04-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"nextLink": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.ResourceGraph/queries?api-version=2019-09-01-preview&$top=10&$skiptoken=skiptoken", | ||
"value": [ | ||
{ | ||
"id": "/subscriptions/87f4f8b0-83c1-4aa9-b318-5237aeb15264/resources/rid1/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", | ||
"name": "MyDockerVMs", | ||
"type": "Microsoft.ResourceGraph/queries", | ||
"tags": {}, | ||
"etag": "5d64408e-4ca3-41f7-b725-6914f3012afa", | ||
"properties": { | ||
"description": "Docker VMs in PROD", | ||
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", | ||
"resultKind": "basic", | ||
"timeModified": "2019-03-12T13:51:13-07:00" | ||
} | ||
}, | ||
{ | ||
"id": "/subscriptions/6abb2f31-3e6a-4134-9968-219a596012a0/resources/rid2/providers/Microsoft.ResourceGraph/queries/MyTestVMs", | ||
"name": "MyTestVMs", | ||
"type": "Microsoft.ResourceGraph/queries", | ||
"tags": {}, | ||
"etag": "b0809832-ca62-4133-8f13-0c46580f9db1", | ||
"properties": { | ||
"description": "Test VMs in PROD", | ||
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'test'", | ||
"resultKind": "basic", | ||
"timeModified": "2019-03-13T13:51:13-07:00" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...resource-manager/Microsoft.ResourceGraph/stable/2019-04-01/examples/GraphQueryUpdate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"title": "Update a saved query", | ||
"description": "Update the existing saved query resource.", | ||
"parameters": { | ||
"subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", | ||
"resourceGroupName": "my-resource-group", | ||
"resourceName": "MyDockerVMs", | ||
"api-version": "2019-04-01", | ||
"body": { | ||
"tags": null, | ||
"etag": "b0809832-ca62-4133-8f13-0c46580f9db1", | ||
"properties": { | ||
"description": "Modified description", | ||
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", | ||
"name": "MyDockerVMs", | ||
"type": "Microsoft.ResourceGraph/queries", | ||
"etag": "73811091-6188-4523-97b7-b5e7134e7fd9", | ||
"tags": null, | ||
"properties": { | ||
"description": "Modified description", | ||
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", | ||
"resultKind": "basic", | ||
"timeModified": "2019-03-14T13:51:13-07:00" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.