Skip to content

Commit

Permalink
Operationalinsights tables, wokspace capping and sku (#9505)
Browse files Browse the repository at this point in the history
* Workspace tables

* Pretty

* Fixes

* Fix

* Fixes

* Add missing properties for capping and SKU

* Fixes

* Fix

* PR fixes - change PUT to PATCH

* Unrequire properties in /tabels PATCH
  • Loading branch information
yoramsinger authored May 26, 2020
1 parent eb91865 commit c6ab418
Show file tree
Hide file tree
Showing 6 changed files with 377 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
{
"swagger": "2.0",
"info": {
"title": "Azure Log Analytics",
"description": "Azure Log Analytics API reference",
"version": "2020-03-01-preview"
},
"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/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/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": "#/definitions/ErrorContract"
}
}
},
"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/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/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": "#/definitions/ErrorContract"
}
}
}
},
"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/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/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": "#/definitions/ErrorContract"
}
}
}
}
}
},
"definitions": {
"TableProperties": {
"properties": {
"retentionInDays": {
"type": "integer",
"format": "int32",
"minimum": 30,
"maximum": 730,
"description": "The data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace retention."
}
},
"description": "Table properties."
},
"Table": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/TableProperties",
"description": "Table properties."
}
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v1/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."
},
"ErrorContract": {
"title": "Error details.",
"description": "Contains details when the response code indicates an error.",
"properties": {
"error": {
"description": "The details of the error.",
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse"
}
}
}
},
"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
Expand Up @@ -369,13 +369,63 @@
"name": "WorkspaceSkuNameEnum",
"modelAsString": true
}
},
"capacityReservationLevel": {
"type": "integer",
"format": "int32",
"description": "The capacity reservation level for this workspace, when CapacityReservation sku is selected."
},
"maxCapacityReservationLevel": {
"type": "integer",
"format": "int32",
"description": "The maximum capacity reservation level available for this workspace, when CapacityReservation sku is selected.",
"readOnly": true
},
"lastSkuUpdate": {
"type": "string",
"format": "date-time",
"description": "The last time when the sku was updated.",
"readOnly": true
}
},
"required": [
"name"
],
"description": "The SKU (tier) of a workspace."
},
"WorkspaceCapping": {
"description": "The daily volume cap for ingestion.",
"properties": {
"dailyQuotaGb": {
"type": "number",
"format": "double",
"description": "The workspace daily quota for ingestion. -1 means unlimited."
},
"quotaNextResetTime": {
"type": "string",
"format": "date-time",
"description": "The time when the quota will be rest.",
"readOnly": true
},
"dataIngestionStatus": {
"type": "string",
"readOnly": true,
"description": "The status of data ingestion for this workspace.",
"enum": [
"RespectQuota",
"ForceOn",
"ForceOff",
"OverQuota",
"SubscriptionSuspended",
"ApproachingQuota"
],
"x-ms-enum": {
"name": "DataIngestionStatus",
"modelAsString": true
}
}
}
},
"WorkspaceProperties": {
"properties": {
"provisioningState": {
Expand Down Expand Up @@ -411,6 +461,10 @@
"maximum": 730,
"description": "The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed for all other Skus. "
},
"workspaceCapping": {
"$ref": "#/definitions/WorkspaceCapping",
"description": "The daily volume cap for ingestion."
},
"publicNetworkAccessForIngestion": {
"description": "The network access type for accessing Log Analytics ingestion.",
"$ref": "#/definitions/PublicNetworkAccessType"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"resourceGroupName": "oiautorest6685",
"workspaceName": "oiautorest6685",
"api-version": "2020-03-01-preview",
"subscriptionId": "00000000-0000-0000-0000-00000000000",
"tableName": "table1"
},
"responses": {
"200": {
"body": {
"properties": {
"retentionInDays": 30
},
"id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/workspaces/testresourcelock/tables/table1",
"name": "table1"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parameters": {
"resourceGroupName": "oiautorest6685",
"workspaceName": "oiautorest6685",
"api-version": "2020-03-01-preview",
"subscriptionId": "00000000-0000-0000-0000-00000000000"
},
"responses": {
"200": {
"body": [
{
"properties": {
"retentionInDays": 7
},
"id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/workspaces/testresourcelock/tables/table1",
"name": "table1"
},
{
"properties": {
"retentionInDays": 7
},
"id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/workspaces/testresourcelock/tables/table2",
"name": "table2"
},
{
"properties": {
"retentionInDays": 7
},
"id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/workspaces/testresourcelock/tables/table3",
"name": "table3"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"resourceGroupName": "oiautorest6685",
"workspaceName": "oiautorest6685",
"api-version": "2020-03-01-preview",
"subscriptionId": "00000000-0000-0000-0000-00000000000",
"tableName": "table1",
"parameters": {
"properties": {
"retentionInDays": 30
}
}
},
"responses": {
"200": {
"body": {
"properties": {
"retentionInDays": 30
},
"id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/workspaces/testresourcelock/tables/table1",
"name": "table1"
}
}
}
}
Loading

0 comments on commit c6ab418

Please sign in to comment.