Skip to content

Commit

Permalink
added new api version for Tables resource (Azure#11850)
Browse files Browse the repository at this point in the history
* added3 new properties to TableProperties:
IsTroubleshootingAllowed, IsTroubleshootingEnabled, IsTroubleshootingEnabledLastActivation.

* added Tables new api version

* changed bool to boolean types

* prettified jsons

* fix erroes in swagger

* undo changes to 2020-03-01-preview version

* pr fixes

* updated TableUpdate example

* changed lastTroubleshootDate from date format to string, removed isTroubleshootingAllowed from body of example

* changed v1 to v2

* changed WorkspaceNameParameter back to V1

* changed ErrorResponse to default ErrorResponse without ref to local definition

* added systemData

* removed systemData

* added systemData to Patch and Get

* moved systemData to Table properties

* deleted systemData from Table.json, added to Get and Put examles

* changed location of systemData in Tables.json

* moved systemData to inside Table definition

* moved systemData inside Table properties
  • Loading branch information
dabenhamMic authored and giromm2ms committed Dec 20, 2020
1 parent 49fb703 commit 2e4c8c7
Show file tree
Hide file tree
Showing 5 changed files with 357 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
{
"swagger": "2.0",
"info": {
"title": "Azure Log Analytics",
"description": "Azure Log Analytics API reference",
"version": "2020-10-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables": {
"get": {
"tags": [
"Tables"
],
"x-ms-examples": {
"TablesListByWorkspace": {
"$ref": "./examples/TablesList.json"
}
},
"operationId": "Tables_ListByWorkspace",
"description": "Gets all the tables for the specified Log Analytics workspace.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK response definition.",
"schema": {
"$ref": "#/definitions/TablesListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
},
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}": {
"patch": {
"tags": [
"Tables"
],
"x-ms-examples": {
"TablesSet": {
"$ref": "./examples/TablesUpdate.json"
}
},
"operationId": "Tables_Update",
"description": "Updates a Log Analytics workspace table properties.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/TableNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Table"
},
"description": "The parameters required to update table properties."
}
],
"responses": {
"200": {
"description": "OK response definition.",
"schema": {
"$ref": "#/definitions/Table"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"Tables"
],
"x-ms-examples": {
"TablesGet": {
"$ref": "./examples/TablesGet.json"
}
},
"operationId": "Tables_Get",
"description": "Gets a Log Analytics workspace table.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/TableNameParameter"
}
],
"responses": {
"200": {
"description": "OK response definition.",
"schema": {
"$ref": "#/definitions/Table"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"TableProperties": {
"properties": {
"retentionInDays": {
"type": "integer",
"format": "int32",
"minimum": 7,
"maximum": 730,
"description": "The data table data retention in days, between 7 and 730. Setting this property to null will default to the workspace retention."
},
"isTroubleshootingAllowed": {
"readOnly": true,
"type": "boolean",
"description": "Specifies if IsTroubleshootingEnabled property can be set for this table."
},
"isTroubleshootEnabled": {
"type": "boolean",
"description": "Enable or disable troubleshoot for this table."
},
"lastTroubleshootDate": {
"readOnly": true,
"type": "string",
"description": "Last time when troubleshooting was set for this table."
}
},
"description": "Table properties."
},
"Table": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/TableProperties",
"description": "Table properties."
},
"systemData": {
"description": "The system metadata relating to this resource.",
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData"
}
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource"
}
],
"description": "Workspace data table definition."
},
"TablesListResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/Table"
},
"description": "A list of data tables."
}
},
"description": "The list tables operation response."
}
},
"parameters": {
"TableNameParameter": {
"name": "tableName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the table.",
"x-ms-parameter-location": "method"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parameters": {
"resourceGroupName": "oiautorest6685",
"workspaceName": "oiautorest6685",
"api-version": "2020-10-01",
"subscriptionId": "00000000-0000-0000-0000-00000000000",
"tableName": "table1"
},
"responses": {
"200": {
"body": {
"properties": {
"retentionInDays": 30,
"isTroubleshootingAllowed": true,
"isTroubleshootEnabled": true,
"lastTroubleshootDate": "Thu, 19 Nov 2020 07:40:51 GMT"
},
"id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/microsoft.operationalinsights/workspaces/oiautorest6685/tables/table1",
"name": "table1",
"systemData": {
"createdBy": "user1",
"createdByType": "User",
"createdAt": "2020-01-01T17:18:19.1234567Z",
"lastModifiedBy": "user2",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"parameters": {
"resourceGroupName": "oiautorest6685",
"workspaceName": "oiautorest6685",
"api-version": "2020-10-01",
"subscriptionId": "00000000-0000-0000-0000-00000000000"
},
"responses": {
"200": {
"body": [
{
"properties": {
"retentionInDays": 30,
"isTroubleshootingAllowed": true,
"isTroubleshootEnabled": true,
"lastTroubleshootDate": "Thu, 19 Nov 2020 07:40:51 GMT"
},
"id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/microsoft.operationalinsights/workspaces/oiautorest6685/tables/table1",
"name": "table1"
},
{
"properties": {
"retentionInDays": 7,
"isTroubleshootingAllowed": true
},
"id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/microsoft.operationalinsights/workspaces/oiautorest6685/tables/table2",
"name": "table2"
},
{
"properties": {
"retentionInDays": 7,
"isTroubleshootingAllowed": false
},
"id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/microsoft.operationalinsights/workspaces/oiautorest6685/tables/table3",
"name": "table3"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"resourceGroupName": "oiautorest6685",
"workspaceName": "oiautorest6685",
"api-version": "2020-10-01",
"subscriptionId": "00000000-0000-0000-0000-00000000000",
"tableName": "table1",
"parameters": {
"properties": {
"retentionInDays": 40,
"isTroubleshootEnabled": true
}
}
},
"responses": {
"200": {
"body": {
"properties": {
"retentionInDays": 40,
"isTroubleshootingAllowed": true,
"isTroubleshootEnabled": true
},
"id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/tables/table1",
"name": "table1",
"systemData": {
"createdBy": "user1",
"createdByType": "User",
"createdAt": "2020-01-01T17:18:19.1234567Z",
"lastModifiedBy": "user2",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ These settings apply only when `--tag=package-2020-10` is specified on the comma
input-file:
- Microsoft.OperationalInsights/stable/2020-10-01/Clusters.json
- Microsoft.OperationalInsights/stable/2020-10-01/Operations.json
- Microsoft.OperationalInsights/stable/2020-10-01/Tables.json
- Microsoft.OperationalInsights/stable/2020-10-01/Workspaces.json
```

Expand Down

0 comments on commit 2e4c8c7

Please sign in to comment.